diff --git a/src/MeshRadio.h b/src/MeshRadio.h index ffb75506..26c8eab4 100644 --- a/src/MeshRadio.h +++ b/src/MeshRadio.h @@ -13,7 +13,7 @@ typedef int ErrorCode; typedef uint8_t NodeNum; -#define MAX_TX_QUEUE 4 // max number of packets which can be waiting for transmission +#define MAX_TX_QUEUE 8 // max number of packets which can be waiting for transmission /** diff --git a/src/configuration.h b/src/configuration.h index e1f0d988..cc7b7a42 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -37,8 +37,8 @@ along with this program. If not, see . // ----------------------------------------------------------------------------- // Select which T-Beam board is being used. Only uncomment one. -// #define T_BEAM_V10 // AKA Rev1 (second board released) -#define HELTEC_LORA32 +#define T_BEAM_V10 // AKA Rev1 (second board released) +// #define HELTEC_LORA32 #define DEBUG_PORT Serial // Serial debug port #define SERIAL_BAUD 115200 // Serial debug baud rate diff --git a/src/main.ino b/src/main.ino index 9c73b035..a93d7d09 100644 --- a/src/main.ino +++ b/src/main.ino @@ -79,7 +79,7 @@ void doDeepSleep(uint64_t msecToWake) #ifdef T_BEAM_V10 if (axp192_found) { - // turn on after initial testing with real hardware + axp.setChgLEDMode(AXP20X_LED_OFF); // turn off the AXP LED // No need to turn this off if the power draw in sleep mode really is just 0.2uA and turning it off would // leave floating input for the IRQ line @@ -360,7 +360,7 @@ void setup() service.init(); BLEServer *serve = initBLE(getDeviceName()); // FIXME, use a real name based on the macaddr - BLEService *bts = createMeshBluetoothService(serve); + createMeshBluetoothService(serve); } void loop() @@ -370,11 +370,19 @@ void loop() service.loop(); loopBLE(); + static bool ledon; + ledon ^= 1; + #ifdef LED_PIN // toggle the led so we can get some rough sense of how often loop is pausing - digitalWrite(LED_PIN, digitalRead(LED_PIN) ? 0 : 1); + digitalWrite(LED_PIN, ledon); #endif + if(axp192_found) { + // blink the axp led + axp.setChgLEDMode(ledon ? AXP20X_LED_LOW_LEVEL : AXP20X_LED_OFF); + } + #ifdef BUTTON_PIN // if user presses button for more than 3 secs, discard our network prefs and reboot (FIXME, use a debounce lib instead of this boilerplate) static bool wasPressed = false;