Initial support for MonteOps's fixed hardware platform (#2582)

* Initial support for MonteOps's fixed hardware platform

* Update platformio env config + cleanup

* Fix platformio build

* Fix platformio build

* Fix wrong definition logic for NCP5623

* Fix another wrong definition logic for NCP5623, it's not board feature

* Fix wrong definition logic for NCP5623 in External Notification code, it's not board feature

* We need for CI magic here

* Another fix related to NCP5623

* Fix cosmetic issue with redifined variable

* Fix typo

* Cleanup and update defs for HW1

* Fix OEM RAK4631

* Fix AQ sensor reading

* Fix AQ sensor reading (better variant)

* Fix build for other nRF52 devices

* Replace HAS_EINK_RAK to RAK_4631
This commit is contained in:
Dmitry Galenko
2023-07-03 16:34:32 +02:00
committed by GitHub
parent b9ad274104
commit 9c141919f6
14 changed files with 340 additions and 23 deletions

View File

@@ -10,7 +10,7 @@
#include "main.h"
#ifdef RAK4630
#ifdef HAS_NCP5623
#include <graphics/RAKled.h>
NCP5623 rgb;
@@ -84,7 +84,7 @@ int32_t ExternalNotificationModule::runOnce()
millis()) {
getExternal(2) ? setExternalOff(2) : setExternalOn(2);
}
#ifdef RAK4630
#ifdef HAS_NCP5623
if (rgb_found.type == ScanI2C::NCP5623) {
green = (green + 50) % 255;
red = abs(red - green) % 255;
@@ -127,7 +127,7 @@ void ExternalNotificationModule::setExternalOn(uint8_t index)
digitalWrite(output, (moduleConfig.external_notification.active ? true : false));
break;
}
#ifdef RAK4630
#ifdef HAS_NCP5623
if (rgb_found.type == ScanI2C::NCP5623) {
rgb.setColor(red, green, blue);
}
@@ -153,7 +153,7 @@ void ExternalNotificationModule::setExternalOff(uint8_t index)
break;
}
#ifdef RAK4630
#ifdef HAS_NCP5623
if (rgb_found.type == ScanI2C::NCP5623) {
red = 0;
green = 0;
@@ -235,7 +235,7 @@ ExternalNotificationModule::ExternalNotificationModule()
LOG_INFO("Using Pin %i in PWM mode\n", config.device.buzzer_gpio);
}
}
#ifdef RAK4630
#ifdef HAS_NCP5623
if (rgb_found.type == ScanI2C::NCP5623) {
rgb.begin();
rgb.setCurrent(10);