mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-08 10:57:51 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user