new sending kinda works

1.2-legacy
geeksville 2020-04-30 10:00:40 -07:00
rodzic fce31560c6
commit 3c3e722181
4 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -8,6 +8,7 @@ Minimum items needed to make sure hardware is good.
- DONE get old radio driver working on NRF52
- DONE basic test of BLE
- DONE get a debug 'serial' console working via the ICE passthrough feature
- add a hard fault handler
- switch to RadioLab? test it with current radio. https://github.com/jgromes/RadioLib
- use "variants" to get all gpio bindings
- plug in correct variants for the real board

Wyświetl plik

@ -17,7 +17,7 @@ static inline void debugger_break(void)
void __attribute__((noreturn)) __assert_func(const char *file, int line, const char *func, const char *failedexpr)
{
DEBUG_MSG("assert failed %s: %d, %s, test=%s\n", file, line, func, failedexpr);
debugger_break();
// debugger_break(); FIXME doesn't work, possibly not for segger
while (1)
; // FIXME, reboot!
}

Wyświetl plik

@ -91,6 +91,8 @@ void RadioLibInterface::loop()
if (wasPending) {
pending = ISR_NONE; // If the flag was set, it is _guaranteed_ the ISR won't be running, because it masked itself
DEBUG_MSG("Handling a LORA interrupt %d!\n", wasPending);
if (wasPending == ISR_TX)
handleTransmitInterrupt();
else if (wasPending == ISR_RX)
@ -193,7 +195,7 @@ void RadioLibInterface::startSend(MeshPacket *txp)
size_t numbytes = beginSending(txp);
int res = iface.startTransmit(radiobuf, numbytes);
assert(res);
assert(res == ERR_NONE);
// Must be done AFTER, starting transmit, because startTransmit clears (possibly stale) interrupt pending register bits
enableInterrupt(isrTxLevel0);

Wyświetl plik

@ -27,7 +27,7 @@ bool SX1262Interface::init()
int res = lora.begin(freq, bw, sf, cr, syncWord, power, currentLimit, preambleLength, tcxoVoltage, useRegulatorLDO);
DEBUG_MSG("LORA init result %d\n", res);
if (res != ERR_NONE)
if (res == ERR_NONE)
res = lora.setCRC(SX126X_LORA_CRC_ON);
return res == ERR_NONE;