check our host PC using the new nrf52 api

1.2-legacy
Kevin Hester 2021-08-12 22:07:18 -07:00
rodzic a9f8080ee7
commit 700e799125
2 zmienionych plików z 11 dodań i 7 usunięć

Wyświetl plik

@ -2,13 +2,15 @@
You probably don't care about this section - skip to the next one.
* list portduino on platformio
* USB nrf52 blocks on reads!!! https://github.com/meshtastic/Meshtastic-device/issues/838
* send debug info 'in-band'
* fix wifi connections for mqtt
* router mode dropping messages? https://meshtastic.discourse.group/t/router-mode-missing-messages/3329/3
* fix ttgo eink screen
* usb lora dongle from pine64
* list portduino on platformio
* figure our wss for mqtt.meshtastic - use cloudflare? 2052 ws, 2053 crypt
* measure rak4630 power draw and turn off power for GPS most of the time. We should be able to run on the small solar panel.
* pine64 lora module
* @havealoha fixedposition not working
* ask for vercel access
* finish plan for riot.im
* turn on setTx(timeout) and state = setDioIrqParams(SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT, SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT); in sx1262 code

Wyświetl plik

@ -5,7 +5,7 @@
#include <ble_gap.h>
#include <memory.h>
#include <stdio.h>
#include <Adafruit_USBD_Device.h>
// #include <Adafruit_USBD_Device.h>
#include "NRF52Bluetooth.h"
#include "error.h"
@ -22,7 +22,9 @@ static inline void debugger_break(void)
bool loopCanSleep() {
// turn off sleep only while connected via USB
return !(TinyUSBDevice.mounted() && !TinyUSBDevice.suspended());
// return true;
return !Serial; // the bool operator on the nrf52 serial class returns true if connected to a PC currently
// return !(TinyUSBDevice.mounted() && !TinyUSBDevice.suspended());
}
// handle standard gcc assert failures
@ -92,7 +94,7 @@ void setBluetoothEnable(bool on)
}
/**
* Override printf to use the SEGGER output library
* Override printf to use the SEGGER output library (note - this does not effect the printf method on the debug console)
*/
int printf(const char *fmt, ...)
{