Skip to content

Commit

Permalink
Switch to ThingSet SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjaeger committed Jul 8, 2023
1 parent 7599b7b commit c7911e2
Show file tree
Hide file tree
Showing 19 changed files with 934 additions and 1,976 deletions.
60 changes: 0 additions & 60 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -325,64 +325,8 @@ config UEXT_OLED_BRIGHTNESS
range 1 255
default 1

config UEXT_SERIAL_THINGSET
depends on THINGSET_SERIAL
bool "Use UEXT serial for ThingSet interface"
default y
help
If the ThingSet interface is not attached to the serial port in the UEXT connector, the
serial in the LS.one port or the debug connector is used (if existing).

endmenu # UEXT port


menu "ThingSet interfaces"

config THINGSET_SERIAL
bool "ThingSet serial interface"

config THINGSET_SERIAL_RX_BUF_SIZE
depends on THINGSET_SERIAL
int "ThingSet serial RX buffer size"
range 64 2048
default 512

config THINGSET_SERIAL_TX_BUF_SIZE
depends on THINGSET_SERIAL
int "ThingSet serial TX buffer size"
range 256 2048
default 1024

config THINGSET_SERIAL_PUB_DEFAULT
bool "Enable serial publication messages at startup"
depends on THINGSET_SERIAL
default y

config THINGSET_CAN
depends on CAN
bool "ThingSet CAN interface"

config THINGSET_CAN_PUB_DEFAULT
bool "Enable CAN publication messages at startup"
depends on THINGSET_CAN
default y

config THINGSET_CAN_DEFAULT_NODE_ID
depends on THINGSET_CAN
int "ThingSet CAN default node ID"
range 0 255
default 20

config THINGSET_EXPERT_PASSWORD
string "ThingSet expert user password"
default "expert123"

config THINGSET_MAKER_PASSWORD
string "ThingSet maker password"
default "maker456"

endmenu # ThingSet interfaces

menu "Logging setup"

config CAN_LOG_LEVEL
Expand Down Expand Up @@ -473,9 +417,5 @@ endif
# include custom Kconfig if existing
orsource "../src/custom/Kconfig"

#if 0
#orsource "modules/thingset/zephyr/Kconfig.thingset"
#endif

# include main Zephyr menu entries from Zephyr root directory
source "Kconfig.zephyr"
14 changes: 7 additions & 7 deletions app/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y

CONFIG_THINGSET=y
CONFIG_THINGSET_NESTED_JSON=y

# ThingSet protocol interface via UART serial
CONFIG_THINGSET_SDK=y
CONFIG_THINGSET_STORAGE=y
CONFIG_THINGSET_SERIAL=y
CONFIG_THINGSET_STORAGE_DATA_VERSION=6
CONFIG_THINGSET_NODE_NAME="Libre Solar MPPT"

# Uncomment to disable regular data publication on ThingSet serial at startup
#CONFIG_THINGSET_SERIAL_PUB_DEFAULT=n
# Must be lower than LED thread to avoid flickering in boards with charlieplexing
CONFIG_THINGSET_SDK_THREAD_PRIORITY=6

# Uncomment to use LS.one or debug RX/TX connector instead of UEXT serial for ThingSet
#CONFIG_UEXT_SERIAL_THINGSET=n
#CONFIG_THINGSET_REPORTING_LIVE_ENABLE_PRESET=n

# Uncomment to enable I2C OLED display in UEXT connector
#CONFIG_UEXT_OLED_DISPLAY=y
Expand Down
4 changes: 1 addition & 3 deletions app/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ zephyr_include_directories(.)
target_sources(app PRIVATE
bat_charger.cpp
data_objects.cpp
data_storage.cpp
daq.cpp
daq_driver.c
device_status.cpp
dcdc.cpp
half_bridge.c
hardware.cpp
oled.cpp
leds.cpp
load.cpp
load_driver.c
Expand All @@ -22,8 +22,6 @@ target_sources(app PRIVATE
setup.cpp
)

add_subdirectory(ext)

if(${CONFIG_CUSTOM_DATA_OBJECTS_FILE})
target_sources(app PRIVATE data_objects_custom.cpp)
endif()
Expand Down
Loading

0 comments on commit c7911e2

Please sign in to comment.