Skip to content

Commit

Permalink
update lmic in preparation for support of new SX1261/1262 chips
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberman54 committed Nov 20, 2024
1 parent 3397537 commit e51e5b2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
6 changes: 3 additions & 3 deletions platformio_orig.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ description = Paxcounter is a device for metering passenger flows in realtime. I

[common]
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
release_version = 3.6.2
release_version = 3.7.0
; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running!
; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
debug_level = 3
Expand All @@ -59,7 +59,7 @@ platform_espressif32 = [email protected]
monitor_speed = 115200
upload_speed = 115200 ; set by build.py and taken from hal file
lib_deps_lora =
mcci-catena/MCCI LoRaWAN LMIC library @ ^4.1.1
mcci-catena/MCCI LoRaWAN LMIC library @ ^5.0.0
lib_deps_display =
bitbank2/OneBitDisplay @ ^2.3.1
bitbank2/bb_spi_lcd @ 2.4.4
Expand All @@ -81,7 +81,7 @@ lib_deps_basic =
https://github.com/cyberman54/libpax.git
https://github.com/SukkoPera/Arduino-Rokkit-Hash.git
bblanchon/ArduinoJson @ ^6.21.5
makuna/RTC @ ^2.4.3
makuna/RTC @ ^2.5.0
mathertel/OneButton @ ^2.5.0
lewisxhe/XPowersLib @ ^0.2.6
256dpi/MQTT @ ^2.5.2
Expand Down
2 changes: 1 addition & 1 deletion platformio_orig_s3.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = Paxcounter is a device for metering passenger flows in realtime. I

[common]
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
release_version = 3.6.2
release_version = 3.7.0
; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running!
; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
debug_level = 3
Expand Down
17 changes: 15 additions & 2 deletions shared/lmic_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,26 @@
//#define LMIC_USE_INTERRUPTS 1
//#endif

// ensure that a radio is defined.
// avoid lmic warning if we don't configure radio in case we haven't one
#if !(defined(CFG_sx1272_radio) || defined(CFG_sx1276_radio))
#if !(defined(CFG_sx1272_radio) || defined(CFG_sx1276_radio) || defined(CFG_sx1261_radio) || defined(CFG_sx1262_radio))
//# warning Target radio not defined, assuming CFG_sx1276_radio
#define CFG_sx1276_radio 1
#elif defined(CFG_sx1272_radio) && (defined(CFG_sx1276_radio) || defined(CFG_sx1261_radio) || defined(CFG_sx1262_radio))
# error You can define at most one target radio
#elif defined(CFG_sx1276_radio) && (defined(CFG_sx1261_radio) || defined(CFG_sx1262_radio))
# error You can define at most one target radio
#elif defined(CFG_sx1261_radio) && (defined(CFG_sx1261_radio))
# error You can define at most one target radio
#endif

// time sync via LoRaWAN network, note: not supported by TTNv2
#define LMIC_ENABLE_DeviceTimeReq 1
// LMIC_ENABLE_DeviceTimeReq
// enable support for MCMD_DeviceTimeReq and MCMD_DeviceTimeAns
// this is always defined, and non-zero to enable it.
#if !defined(LMIC_ENABLE_DeviceTimeReq)
# define LMIC_ENABLE_DeviceTimeReq 1
#endif

// This tells LMIC to make the receive windows bigger, in case your clock is
// faster or slower. This causes the transceiver to be earlier switched on,
Expand Down

0 comments on commit e51e5b2

Please sign in to comment.