sforkowany z mirror/meshtastic-firmware
Merge branch 'master' into patch-1
commit
4d4d7b38cc
|
@ -17,6 +17,7 @@ Items to complete soon (next couple of alpha releases).
|
||||||
|
|
||||||
Items to complete before the first beta release.
|
Items to complete before the first beta release.
|
||||||
|
|
||||||
|
- Use the RFM95 sequencer to stay in idle mode most of the time, then automatically go to receive mode and automatically go from transmit to receive mode. See 4.2.8.2 of manual.
|
||||||
- possibly switch to https://github.com/SlashDevin/NeoGPS for gps comms
|
- possibly switch to https://github.com/SlashDevin/NeoGPS for gps comms
|
||||||
- good source of battery/signal/gps icons https://materialdesignicons.com/
|
- good source of battery/signal/gps icons https://materialdesignicons.com/
|
||||||
- research and implement better mesh algorithm - investigate changing routing to https://github.com/sudomesh/LoRaLayer2 ?
|
- research and implement better mesh algorithm - investigate changing routing to https://github.com/sudomesh/LoRaLayer2 ?
|
||||||
|
|
|
@ -60,7 +60,7 @@ debug_tool = jlink
|
||||||
debug_init_break = tbreak setup
|
debug_init_break = tbreak setup
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
https://github.com/meshtastic/RadioHead.git#a87518beacfff53bc2eec5ae33c607713e9596e6
|
https://github.com/meshtastic/RadioHead.git#d32df52f8c80eb2525d3774adc1fe36bb4c32952
|
||||||
https://github.com/meshtastic/esp8266-oled-ssd1306.git ; ESP8266_SSD1306
|
https://github.com/meshtastic/esp8266-oled-ssd1306.git ; ESP8266_SSD1306
|
||||||
AXP202X_Library
|
AXP202X_Library
|
||||||
SPI
|
SPI
|
||||||
|
|
|
@ -19,8 +19,9 @@ CustomRF95::CustomRF95(MemoryPool<MeshPacket> &_pool, PointerQueue<MeshPacket> &
|
||||||
bool CustomRF95::canSleep()
|
bool CustomRF95::canSleep()
|
||||||
{
|
{
|
||||||
// We allow initializing mode, because sometimes while testing we don't ever call init() to turn on the hardware
|
// We allow initializing mode, because sometimes while testing we don't ever call init() to turn on the hardware
|
||||||
DEBUG_MSG("canSleep, mode=%d, isRx=%d, txEmpty=%d, txGood=%d\n", _mode, _isReceiving, txQueue.isEmpty(), _txGood);
|
bool isRx = isReceiving();
|
||||||
return (_mode == RHModeInitialising || _mode == RHModeIdle || _mode == RHModeRx) && !_isReceiving && txQueue.isEmpty();
|
DEBUG_MSG("canSleep, mode=%d, isRx=%d, txEmpty=%d, txGood=%d\n", _mode, isRx, txQueue.isEmpty(), _txGood);
|
||||||
|
return (_mode == RHModeInitialising || _mode == RHModeIdle || _mode == RHModeRx) && !isRx && txQueue.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CustomRF95::sleep()
|
bool CustomRF95::sleep()
|
||||||
|
@ -47,7 +48,7 @@ ErrorCode CustomRF95::send(MeshPacket *p)
|
||||||
// We wait _if_ we are partially though receiving a packet (rather than just merely waiting for one).
|
// We wait _if_ we are partially though receiving a packet (rather than just merely waiting for one).
|
||||||
// To do otherwise would be doubly bad because not only would we drop the packet that was on the way in,
|
// To do otherwise would be doubly bad because not only would we drop the packet that was on the way in,
|
||||||
// we almost certainly guarantee no one outside will like the packet we are sending.
|
// we almost certainly guarantee no one outside will like the packet we are sending.
|
||||||
if (_mode == RHModeIdle || (_mode == RHModeRx && !_isReceiving)) {
|
if (_mode == RHModeIdle || (_mode == RHModeRx && !isReceiving())) {
|
||||||
// if the radio is idle, we can send right away
|
// if the radio is idle, we can send right away
|
||||||
DEBUG_MSG("immedate send on mesh (txGood=%d,rxGood=%d,rxBad=%d)\n", txGood(), rxGood(), rxBad());
|
DEBUG_MSG("immedate send on mesh (txGood=%d,rxGood=%d,rxBad=%d)\n", txGood(), rxGood(), rxBad());
|
||||||
startSend(p);
|
startSend(p);
|
||||||
|
|
|
@ -355,7 +355,7 @@ void loop()
|
||||||
loopBLE();
|
loopBLE();
|
||||||
|
|
||||||
// for debug printing
|
// for debug printing
|
||||||
// service.radio.rf95.canSleep();
|
// service.radio.radioIf.canSleep();
|
||||||
|
|
||||||
#ifdef PMU_IRQ
|
#ifdef PMU_IRQ
|
||||||
if (pmu_irq) {
|
if (pmu_irq) {
|
||||||
|
|
Ładowanie…
Reference in New Issue