Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added lightning statistics reset, renamed CMD_RESET_RAINGAUGE to CMD_RESET_WS_POSTPROC #73

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions BresserWeatherSensorLWCmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
// 20240606 Added CMD_GET_STATUS_INTERVAL/CMD_SET_STATUS_INTERVAL
// 20240608 Added CMD_GET_LW_STATUS
// 20240609 Refactored command encoding
// 20240614 Renamed CMD_RESET_RAINGAUGE to CMD_RESET_WS_POSTPROC
//
// ToDo:
// -
Expand Down Expand Up @@ -260,19 +261,16 @@

// Uplink: n.a.

// CMD_RESET_RAINGAUGE
// --------------------
// Port: CMD_RESET_RAINGAUGE
#define CMD_RESET_RAINGAUGE 0xC3
// CMD_RESET_WS_POSTPROC
// ----------------------
// Port: CMD_RESET_WS_POSTPROC
#define CMD_RESET_WS_POSTPROC 0xC3

// Downlink (command):
// byte0: flags[7:0] (optional)
// byte0: flags[ 7: 0]

// Uplink: n.a.

// Reset Lightning???
// -------------------

// CMD_GET_SENSORS_INC
// --------------------
// Note: Get sensors include list (0...12 IDs)
Expand Down
9 changes: 5 additions & 4 deletions scripts/downlink_formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// port = CMD_SET_SLEEP_INTERVAL_LONG, {"sleep_interval_long": <interval_in_seconds>}
// port = CMD_GET_DATETIME, {"cmd": "CMD_GET_DATETIME"} / payload = 0x00
// port = CMD_SET_DATETIME, {"epoch": <epoch>}
// port = CMD_RESET_RAINGAUGE, {"reset_flags": <flags>}
// port = CMD_RESET_WS_POSTPROC, {"reset_flags": <flags>}
// port = CMD_GET_LW_CONFIG, {"cmd": "CMD_GET_LW_CONFIG"} / payload = 0x00
// port = CMD_GET_WS_TIMEOUT, {"cmd": "CMD_GET_WS_TIMEOUT" / payload = 0x00
// port = CMD_SET_WS_TIMEOUT, {"ws_timeout": <ws_timeout>}
Expand Down Expand Up @@ -127,6 +127,7 @@
// 20240607 Added CMD_GET_STATUS_INTERVAL/CMD_SET_STATUS_INTERVAL
// 20240608 Added CMD_GET_LW_STATUS
// 20240609 Refactored command encoding
// 20240614 Renamed CMD_RESET_RAINGAUGE to CMD_RESET_WS_POSTPROC
//
// ToDo:
// -
Expand All @@ -147,7 +148,7 @@ const CMD_GET_APP_PAYLOAD_CFG = 0x46;
const CMD_SET_APP_PAYLOAD_CFG = 0x47;
const CMD_GET_WS_TIMEOUT = 0xC0;
const CMD_SET_WS_TIMEOUT = 0xC1;
const CMD_RESET_RAINGAUGE = 0xC3;
const CMD_RESET_WS_POSTPROC = 0xC3;
const CMD_GET_SENSORS_INC = 0xC6;
const CMD_SET_SENSORS_INC = 0xC7;
const CMD_GET_SENSORS_EXC = 0xC8;
Expand Down Expand Up @@ -424,7 +425,7 @@ function encodeDownlink(input) {
}
return {
bytes: [value],
fPort: CMD_RESET_RAINGAUGE,
fPort: CMD_RESET_WS_POSTPROC,
warnings: [],
errors: []
};
Expand Down Expand Up @@ -609,7 +610,7 @@ function decodeDownlink(input) {
ws_timeout: uint8(input.bytes)
}
};
case CMD_RESET_RAINGAUGE:
case CMD_RESET_WS_POSTPROC:
return {
data: {
reset_flags: "0x" + uint8(input.bytes).toString(16)
Expand Down
2 changes: 1 addition & 1 deletion scripts/uplink_formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// port = CMD_SET_SLEEP_INTERVAL_LONG, {"sleep_interval_long": <interval_in_seconds>}
// port = CMD_GET_DATETIME, {"cmd": "CMD_GET_DATETIME"} / payload = 0x00
// port = CMD_SET_DATETIME, {"epoch": <epoch>}
// port = CMD_RESET_RAINGAUGE, {"reset_flags": <flags>}
// port = CMD_RESET_WS_POSTPROC, {"reset_flags": <flags>}
// port = CMD_GET_LW_CONFIG, {"cmd": "CMD_GET_LW_CONFIG"} / payload = 0x00
// port = CMD_GET_WS_TIMEOUT, {"cmd": "CMD_GET_WS_TIMEOUT" / payload = 0x00
// port = CMD_SET_WS_TIMEOUT, {"ws_timeout": <ws_timeout>}
Expand Down
Loading
Loading