compiler warning sanitizations
This commit is contained in:
parent
438b3485e5
commit
a6cbc2479e
@ -206,7 +206,7 @@ uint8_t GetCharWidth(char cChar) {
|
||||
}
|
||||
|
||||
void ScrollMatrixLeft(uint8_t *buf, const uint16_t cols, const uint16_t rows) {
|
||||
uint32_t i, k, idx;
|
||||
uint32_t i, k, idx = 0;
|
||||
const uint32_t x = cols / 8;
|
||||
|
||||
for (k = 0; k < rows; k++) {
|
||||
|
@ -22,6 +22,12 @@
|
||||
#define LMIC_USE_INTERRUPTS 1
|
||||
#endif
|
||||
|
||||
// avoid lmic warning if we don't configure radio because we don't have one
|
||||
#define CFG_sx1276_radio 1
|
||||
#if ! (defined(CFG_sx1272_radio) || defined(CFG_sx1276_radio))
|
||||
#define CFG_sx1276_radio 1
|
||||
#endif
|
||||
|
||||
// time sync via LoRaWAN network, note: not supported by TTNv2
|
||||
#define LMIC_ENABLE_DeviceTimeReq 1
|
||||
|
||||
|
@ -306,30 +306,30 @@ esp_err_t lora_stack_init(bool do_join) {
|
||||
&lmicTask, // task handle
|
||||
1); // CPU core
|
||||
|
||||
#ifdef LORA_ABP
|
||||
// Pass ABP parameters to LMIC_setSession
|
||||
#ifdef LORA_ABP
|
||||
// Pass ABP parameters to LMIC_setSession
|
||||
LMIC_reset();
|
||||
uint8_t appskey[sizeof(APPSKEY)];
|
||||
uint8_t nwkskey[sizeof(NWKSKEY)];
|
||||
memcpy_P(appskey, APPSKEY, sizeof(APPSKEY));
|
||||
memcpy_P(nwkskey, NWKSKEY, sizeof(NWKSKEY));
|
||||
LMIC_setSession(NETID, DEVADDR, nwkskey, appskey);
|
||||
// These parameters are defined as macro in loraconf.h
|
||||
setABPParamaters();
|
||||
#else
|
||||
// Start join procedure if not already joined,
|
||||
// lora_setupForNetwork(true) is called by eventhandler when joined
|
||||
// else continue current session
|
||||
if (do_join) {
|
||||
if (!LMIC_startJoining())
|
||||
ESP_LOGI(TAG, "Already joined");
|
||||
} else {
|
||||
LMIC_reset();
|
||||
uint8_t appskey[sizeof(APPSKEY)];
|
||||
uint8_t nwkskey[sizeof(NWKSKEY)];
|
||||
memcpy_P(appskey, APPSKEY, sizeof(APPSKEY));
|
||||
memcpy_P(nwkskey, NWKSKEY, sizeof(NWKSKEY));
|
||||
LMIC_setSession (NETID, DEVADDR, nwkskey, appskey);
|
||||
// These parameters are defined as macro in loraconf.h
|
||||
setABPParamaters();
|
||||
#else
|
||||
// Start join procedure if not already joined,
|
||||
// lora_setupForNetwork(true) is called by eventhandler when joined
|
||||
// else continue current session
|
||||
if (do_join) {
|
||||
if (!LMIC_startJoining())
|
||||
ESP_LOGI(TAG, "Already joined");
|
||||
} else {
|
||||
LMIC_reset();
|
||||
LMIC_setSession(RTCnetid, RTCdevaddr, RTCnwkKey, RTCartKey);
|
||||
LMIC.seqnoUp = RTCseqnoUp;
|
||||
LMIC.seqnoDn = RTCseqnoDn;
|
||||
}
|
||||
#endif
|
||||
LMIC_setSession(RTCnetid, RTCdevaddr, RTCnwkKey, RTCartKey);
|
||||
LMIC.seqnoUp = RTCseqnoUp;
|
||||
LMIC.seqnoDn = RTCseqnoDn;
|
||||
}
|
||||
#endif
|
||||
// start lmic send task
|
||||
xTaskCreatePinnedToCore(lora_send, // task function
|
||||
"lorasendtask", // name of task
|
||||
|
@ -170,6 +170,8 @@ void timesync_store(uint32_t timestamp, timesync_t timestamp_type) {
|
||||
// callback function to receive time answer from network or answer
|
||||
void IRAM_ATTR timesync_serverAnswer(void *pUserData, int flag) {
|
||||
|
||||
#if (TIME_SYNC_LORASERVER) || (TIME_SYNC_LORAWAN)
|
||||
|
||||
// if no timesync handshake is pending then exit
|
||||
if (!timeSyncPending)
|
||||
return;
|
||||
@ -269,4 +271,6 @@ Exit:
|
||||
// inform processing task
|
||||
xTaskNotify(timeSyncProcTask, (rc ? rcv_seqNo : TIME_SYNC_END_FLAG),
|
||||
eSetBits);
|
||||
|
||||
#endif // (TIME_SYNC_LORASERVER) || (TIME_SYNC_LORAWAN)
|
||||
}
|
Loading…
Reference in New Issue
Block a user