R1 Neo: Turn off debugging, rtc cleanup
This commit is contained in:
@@ -33,9 +33,9 @@ void AutoDiscoverRTCClock::begin(TwoWire& wire) {
|
|||||||
|
|
||||||
if (i2c_probe(wire, RV3028_ADDRESS)) {
|
if (i2c_probe(wire, RV3028_ADDRESS)) {
|
||||||
rtc_rv3028.initI2C(wire);
|
rtc_rv3028.initI2C(wire);
|
||||||
rtc_rv3028.writeToRegister(0x35, 0x00);
|
rtc_rv3028.writeToRegister(0x35, 0x00);
|
||||||
rtc_rv3028.writeToRegister(0x37, 0xB4); // Direct Switching Mode (DSM): when VDD < VBACKUP, switchover occurs from VDD to VBACKUP
|
rtc_rv3028.writeToRegister(0x37, 0xB4); // Direct Switching Mode (DSM): when VDD < VBACKUP, switchover occurs from VDD to VBACKUP
|
||||||
rtc_rv3028.set24HourMode(); // Set the device to use the 24hour format (default) instead of the 12 hour format
|
rtc_rv3028.set24HourMode(); // Set the device to use the 24hour format (default) instead of the 12 hour format
|
||||||
rv3028_success = true;
|
rv3028_success = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const PowerMgtConfig power_config = {
|
|||||||
|
|
||||||
void R1NeoBoard::initiateShutdown(uint8_t reason) {
|
void R1NeoBoard::initiateShutdown(uint8_t reason) {
|
||||||
// Disable LoRa module power before shutdown
|
// Disable LoRa module power before shutdown
|
||||||
|
MESH_DEBUG_PRINTLN("R1Neo: shutting down");
|
||||||
digitalWrite(SX126X_POWER_EN, LOW);
|
digitalWrite(SX126X_POWER_EN, LOW);
|
||||||
|
|
||||||
if (reason == SHUTDOWN_REASON_LOW_VOLTAGE ||
|
if (reason == SHUTDOWN_REASON_LOW_VOLTAGE ||
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public:
|
|||||||
#define BATTERY_SAMPLES 8
|
#define BATTERY_SAMPLES 8
|
||||||
|
|
||||||
uint16_t getBattMilliVolts() override {
|
uint16_t getBattMilliVolts() override {
|
||||||
|
MESH_DEBUG_PRINTLN("R1Neo: Sampling battery");
|
||||||
analogReadResolution(12);
|
analogReadResolution(12);
|
||||||
|
|
||||||
uint32_t raw = 0;
|
uint32_t raw = 0;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ build_flags =
|
|||||||
-D BLE_DEBUG_LOGGING=1
|
-D BLE_DEBUG_LOGGING=1
|
||||||
-D OFFLINE_QUEUE_SIZE=256
|
-D OFFLINE_QUEUE_SIZE=256
|
||||||
; -D MESH_PACKET_LOGGING=1
|
; -D MESH_PACKET_LOGGING=1
|
||||||
-D MESH_DEBUG=1
|
; -D MESH_DEBUG=1
|
||||||
build_src_filter = ${R1Neo.build_src_filter}
|
build_src_filter = ${R1Neo.build_src_filter}
|
||||||
+<helpers/ui/buzzer.cpp>
|
+<helpers/ui/buzzer.cpp>
|
||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
|
|||||||
Reference in New Issue
Block a user