This commit introduces the VND7050AJ driver as a new submodule and integrates it into the project.
Key changes include:
- Added as a git submodule.
- Enhanced the gateway application () with LittleFS and the settings subsystem.
- Implemented new shell commands (, , ) for managing custom settings.
- Added functionality to compact the settings file.
- Updated to include new library dependencies and log return code.
- Adjusted include paths for in relevant files.
Signed-off-by: Eduard Iten <eduard@iten.pro>
Renamed "Set Obstacle Open" and "Set Obstacle Close" menu options to "Set Obstacle Current Open" and "Set Obstacle Current Close" respectively in . This provides more precise terminology for the obstacle detection current thresholds.
Signed-off-by: Eduard Iten <eduard@iten.pro>
This commit introduces configurable obstacle detection thresholds for the valve, allowing them to be set and persisted via the Zephyr settings subsystem and controlled through the shell and Modbus tool.
- `software/lib/valve/Kconfig`: Added new Kconfig options `VALVE_OBSTACLE_THRESHOLD_OPEN_MA` and `VALVE_OBSTACLE_THRESHOLD_CLOSE_MA` for compile-time configuration and default values.
- `software/include/lib/valve.h`: Removed hardcoded defines and added API functions for setting and getting obstacle thresholds.
- `software/lib/valve/valve.c`:
- Updated `valve_work_handler` to use the new configurable obstacle thresholds.
- Integrated loading and saving of obstacle thresholds via the settings subsystem in `valve_init`.
- Implemented the new setter and getter functions for obstacle thresholds.
- Updated the `LOG_INF` message in `valve_init` to display the new obstacle threshold values.
- `software/apps/slave_node/prj.conf`: Added default values for the new Kconfig options.
- `software/lib/shell_valve/shell_valve.c`: Added new shell commands `valve set_obstacle_open` and `valve set_obstacle_close` to modify the obstacle thresholds, and updated `valve show` to display them.
- `software/tools/modbus_tool/modbus_tool.py`:
- Defined new Modbus holding registers (`REG_HOLDING_OBSTACLE_THRESHOLD_OPEN_MA`, `REG_HOLDING_OBSTACLE_THRESHOLD_CLOSE_MA`).
- Updated `poll_status` to read these new registers.
- Modified the `main_menu` to include "Set Obstacle Open" and "Set Obstacle Close" options in the settings menu, allowing users to view and modify these parameters.
- `software/lib/modbus_server/modbus_server.c`:
- Updated `holding_reg_rd` to read the new obstacle threshold registers.
- Updated `holding_reg_wr` to write to the new obstacle threshold registers.
- Removed incorrect `REG_HOLDING_END_CURRENT_THRESHOLD_OPEN_MA` and `REG_HOLDING_END_CURRENT_THRESHOLD_CLOSE_MA` cases from `input_reg_rd`.
- `software/include/lib/modbus_registers.h`: Created a new header file to centralize Modbus register definitions, which were previously hardcoded in `modbus_tool.py`.
Signed-off-by: Eduard Iten <eduard@iten.pro>
Implemented a mechanism to force a full UI redraw in the Modbus tool upon successful reconnection to the serial port. The function now sets a flag in the shared status data, which is then detected by the function. Upon detection, clears the screen and removes the flag, ensuring that any stale error messages are cleared and the UI is fully refreshed.
Signed-off-by: Eduard Iten <eduard@iten.pro>
Replaced with and with in the and functions of . This change optimizes screen updates in the Curses-based UI, which should significantly reduce flickering when running the tool over SSH connections.
Signed-off-by: Eduard Iten <eduard@iten.pro>
Removed the 'Toggle Output 1' and 'Toggle Output 2' menu options from the Modbus tool's main menu. This simplifies the user interface by removing functionality that is not directly related to the core valve control.
Signed-off-by: Eduard Iten <eduard@iten.pro>
Introduces separate configurable current thresholds for obstacle detection
during valve opening and closing movements.
- Added state to .
- Added and
to .
- Modified to implement obstacle detection in ,
setting on high current, and to load/save
these new thresholds via settings.
- Added new setter/getter functions for obstacle thresholds to and .
- Updated with new shell commands (, )
and updated to display these settings.
- Updated to document the new registers and error states.
- Updated to include new register definitions, menu options,
and display of obstacle current thresholds.
Introduces separate Modbus holding registers for configurable end-position
current thresholds for both opening and closing valve movements.
- Added REG_HOLDING_VALVE_END_CURRENT_THRESHOLD_OPEN_MA and
REG_HOLDING_VALVE_END_CURRENT_THRESHOLD_CLOSE_MA to modbus_server.h.
- Modified valve.c to use these new thresholds and save/load them via settings.
- Added new setter functions to valve.h.
- Created new shell_valve library with commands to set/get these thresholds.
- Updated modbus_tool.py to include new menu options for setting thresholds.
- Updated docs/modbus-registers.de.md to document the new registers.
This enhances the flexibility and calibration of the valve control system.
This commit introduces a new Modbus input register for the system's supply voltage.
- The `modbus-registers.de.md` documentation is updated to include the `SUPPLY_VOLTAGE_MV` register at address `0x00F5` within the system block.
- The `modbus_server.h` header defines the new register.
- The `modbus_server.c` implementation provides a fixed value (12300 mV) for this register.
- The `modbus_tool.py` script is updated to read and display this new supply voltage value in the UI.
This lays the groundwork for integrating actual voltage measurements in the future.
- Implement a simple, curses-based file browser to allow selecting firmware files from the filesystem.
- The selected file path is used for the firmware update process.
- Fix a visual bug where the progress bar would not reach 100% upon completion.
- Remove a leftover function that was causing a NameError.
- Add a new thread to handle the firmware update process, preventing the UI from freezing.
- The UI now displays a progress bar and status messages during the update.
- The tool reads a file and sends it to the slave in chunks.
- Add a dummy for testing purposes.
- Fix Modbus communication issues by reducing the chunk size to a safe value (248 bytes) and sending data in smaller bursts to improve stability.
- Update the README with the new features and instructions.
- Update the TUI to display all new registers from the slave, including digital I/O and system status.
- Add new menu buttons to control digital outputs and set the watchdog timer.
- Add a placeholder button for the firmware update process.
- Fix various bugs, including incorrect argument passing in Modbus calls and a module import error.
- Refactor the curses drawing loop to be state-based, eliminating screen flicker after user input.
- Add a helper function to format uptime from seconds into a human-readable string (d/h/m/s).
- Replace the basic command-line prompt with a full-screen, interactive TUI using the library.
- The new UI provides a real-time, tabular status display and intuitive, button-style menu navigation.
- Implement a consistent blue background theme for better aesthetics.
- Add a detailed with installation and usage instructions.
- Fix several bugs in the Modbus communication logic.