Thinknode_m5 minor fixes (#10049)
This commit is contained in:
co-authored by
GitHub
parent
8dc3c0541b
commit
98efb25a0c
+1
-1
@@ -819,7 +819,7 @@ void NodeDB::installDefaultModuleConfig()
|
||||
moduleConfig.has_store_forward = true;
|
||||
moduleConfig.has_telemetry = true;
|
||||
moduleConfig.has_external_notification = true;
|
||||
#if defined(PIN_BUZZER) || defined(PIN_VIBRATION) || defined(LED_NOTIFICATION)
|
||||
#if defined(PIN_BUZZER) || defined(PIN_VIBRATION) || defined(LED_NOTIFICATION) || defined(PCA_LED_NOTIFICATION)
|
||||
moduleConfig.external_notification.enabled = true;
|
||||
#endif
|
||||
#if defined(PIN_BUZZER)
|
||||
|
||||
@@ -203,6 +203,10 @@ void ExternalNotificationModule::setExternalState(uint8_t index, bool on)
|
||||
default:
|
||||
if (output > 0)
|
||||
digitalWrite(output, (moduleConfig.external_notification.active ? on : !on));
|
||||
#ifdef PCA_LED_NOTIFICATION
|
||||
io.digitalWrite(PCA_LED_NOTIFICATION, on);
|
||||
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +231,9 @@ void cpuDeepSleep(uint32_t msecToWake)
|
||||
#if SOC_RTCIO_HOLD_SUPPORTED && SOC_PM_SUPPORT_EXT_WAKEUP
|
||||
uint64_t gpioMask = (1ULL << (config.device.button_gpio ? config.device.button_gpio : BUTTON_PIN));
|
||||
#endif
|
||||
|
||||
#ifdef ALT_BUTTON_WAKE
|
||||
gpioMask |= (1ULL << BUTTON_PIN_ALT);
|
||||
#endif
|
||||
#ifdef BUTTON_NEED_PULLUP
|
||||
gpio_pullup_en((gpio_num_t)BUTTON_PIN);
|
||||
#endif
|
||||
|
||||
@@ -9,11 +9,11 @@ void earlyInitVariant()
|
||||
io.pinMode(PCA_PIN_EINK_EN, OUTPUT);
|
||||
io.pinMode(PCA_PIN_POWER_EN, OUTPUT);
|
||||
io.pinMode(PCA_LED_POWER, OUTPUT);
|
||||
io.pinMode(PCA_LED_USER, OUTPUT);
|
||||
io.pinMode(PCA_LED_NOTIFICATION, OUTPUT);
|
||||
io.pinMode(PCA_LED_ENABLE, OUTPUT);
|
||||
|
||||
io.digitalWrite(PCA_PIN_POWER_EN, HIGH);
|
||||
io.digitalWrite(PCA_LED_USER, LOW);
|
||||
io.digitalWrite(PCA_LED_NOTIFICATION, LOW);
|
||||
io.digitalWrite(PCA_LED_ENABLE, LOW);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
// LED
|
||||
// Both of these are on the GPIO expander
|
||||
#define PCA_LED_USER 1 // the Blue LED
|
||||
#define PCA_LED_ENABLE 2 // the power supply to the LEDs, in an OR arrangement with VBUS power
|
||||
#define PCA_LED_POWER 3 // the Red LED? Seems to have hardware logic to blink when USB is plugged in.
|
||||
#define PCA_LED_NOTIFICATION 1 // the Blue LED
|
||||
#define PCA_LED_ENABLE 2 // the power supply to the LEDs, in an OR arrangement with VBUS power
|
||||
#define PCA_LED_POWER 3 // the Red LED? Seems to have hardware logic to blink when USB is plugged in.
|
||||
#define POWER_LED_HARDWARE_BLINKS_WHILE_CHARGING
|
||||
|
||||
// USB_CHECK
|
||||
@@ -18,7 +18,7 @@
|
||||
#define BATTERY_PIN 8
|
||||
#define ADC_CHANNEL ADC1_GPIO8_CHANNEL
|
||||
|
||||
#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
|
||||
#define ADC_MULTIPLIER 2.0 // 2.0 + 10% for correction of display undervoltage.
|
||||
|
||||
#define PIN_BUZZER 9
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
|
||||
#define BUTTON_PIN PIN_BUTTON1
|
||||
#define BUTTON_PIN_ALT PIN_BUTTON2
|
||||
#define ALT_BUTTON_WAKE
|
||||
|
||||
#define SERIAL_PRINT_PORT 0
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user