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) {
|
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;
|
const uint32_t x = cols / 8;
|
||||||
|
|
||||||
for (k = 0; k < rows; k++) {
|
for (k = 0; k < rows; k++) {
|
||||||
|
@ -22,6 +22,12 @@
|
|||||||
#define LMIC_USE_INTERRUPTS 1
|
#define LMIC_USE_INTERRUPTS 1
|
||||||
#endif
|
#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
|
// time sync via LoRaWAN network, note: not supported by TTNv2
|
||||||
#define LMIC_ENABLE_DeviceTimeReq 1
|
#define LMIC_ENABLE_DeviceTimeReq 1
|
||||||
|
|
||||||
|
@ -306,17 +306,17 @@ esp_err_t lora_stack_init(bool do_join) {
|
|||||||
&lmicTask, // task handle
|
&lmicTask, // task handle
|
||||||
1); // CPU core
|
1); // CPU core
|
||||||
|
|
||||||
#ifdef LORA_ABP
|
#ifdef LORA_ABP
|
||||||
// Pass ABP parameters to LMIC_setSession
|
// Pass ABP parameters to LMIC_setSession
|
||||||
LMIC_reset();
|
LMIC_reset();
|
||||||
uint8_t appskey[sizeof(APPSKEY)];
|
uint8_t appskey[sizeof(APPSKEY)];
|
||||||
uint8_t nwkskey[sizeof(NWKSKEY)];
|
uint8_t nwkskey[sizeof(NWKSKEY)];
|
||||||
memcpy_P(appskey, APPSKEY, sizeof(APPSKEY));
|
memcpy_P(appskey, APPSKEY, sizeof(APPSKEY));
|
||||||
memcpy_P(nwkskey, NWKSKEY, sizeof(NWKSKEY));
|
memcpy_P(nwkskey, NWKSKEY, sizeof(NWKSKEY));
|
||||||
LMIC_setSession (NETID, DEVADDR, nwkskey, appskey);
|
LMIC_setSession(NETID, DEVADDR, nwkskey, appskey);
|
||||||
// These parameters are defined as macro in loraconf.h
|
// These parameters are defined as macro in loraconf.h
|
||||||
setABPParamaters();
|
setABPParamaters();
|
||||||
#else
|
#else
|
||||||
// Start join procedure if not already joined,
|
// Start join procedure if not already joined,
|
||||||
// lora_setupForNetwork(true) is called by eventhandler when joined
|
// lora_setupForNetwork(true) is called by eventhandler when joined
|
||||||
// else continue current session
|
// else continue current session
|
||||||
@ -329,7 +329,7 @@ esp_err_t lora_stack_init(bool do_join) {
|
|||||||
LMIC.seqnoUp = RTCseqnoUp;
|
LMIC.seqnoUp = RTCseqnoUp;
|
||||||
LMIC.seqnoDn = RTCseqnoDn;
|
LMIC.seqnoDn = RTCseqnoDn;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// start lmic send task
|
// start lmic send task
|
||||||
xTaskCreatePinnedToCore(lora_send, // task function
|
xTaskCreatePinnedToCore(lora_send, // task function
|
||||||
"lorasendtask", // name of task
|
"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
|
// callback function to receive time answer from network or answer
|
||||||
void IRAM_ATTR timesync_serverAnswer(void *pUserData, int flag) {
|
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 no timesync handshake is pending then exit
|
||||||
if (!timeSyncPending)
|
if (!timeSyncPending)
|
||||||
return;
|
return;
|
||||||
@ -269,4 +271,6 @@ Exit:
|
|||||||
// inform processing task
|
// inform processing task
|
||||||
xTaskNotify(timeSyncProcTask, (rc ? rcv_seqNo : TIME_SYNC_END_FLAG),
|
xTaskNotify(timeSyncProcTask, (rc ? rcv_seqNo : TIME_SYNC_END_FLAG),
|
||||||
eSetBits);
|
eSetBits);
|
||||||
|
|
||||||
|
#endif // (TIME_SYNC_LORASERVER) || (TIME_SYNC_LORAWAN)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user