Skip to content

Commit

Permalink
Merge pull request #866 from proddy/dev
Browse files Browse the repository at this point in the history
add test for #865
  • Loading branch information
proddy authored Dec 30, 2022
2 parents 2db99a3 + 8fa74c6 commit 6c09134
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions src/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ bool Test::run_test(const char * command, int8_t id) {
// HC1 on 0x20
uart_telegram({0xA0, 00, 0xFF, 00, 01, 0xD7, 00, 00, 00, 0x80, 00, 00, 00, 00, 03, 0xC5});

// TODO

return true;
}

Expand Down Expand Up @@ -1549,6 +1551,20 @@ void Test::run_test(uuid::console::Shell & shell, const std::string & cmd, const
shell.invoke_command("call mixer info");
shell.invoke_command("call system publish");
shell.invoke_command("show mqtt");

// shell.invoke_command("call mixer wwc1 info");
// shell.invoke_command("call mixer wwc2 info");

// test API
#if defined(EMSESP_STANDALONE)
AsyncWebServerRequest request;
request.url("/api/mixer");
EMSESP::webAPIService.webAPIService_get(&request);
request.url("/api/mixer/hc1/pumpstatus");
EMSESP::webAPIService.webAPIService_get(&request);
request.url("/api/mixer/wwc2/pumpstatus");
EMSESP::webAPIService.webAPIService_get(&request);
#endif
}

if (command == "crash") {
Expand Down
4 changes: 2 additions & 2 deletions src/test/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace emsesp {

// #define EMSESP_DEBUG_DEFAULT "thermostat"
// #define EMSESP_DEBUG_DEFAULT "solar"
// #define EMSESP_DEBUG_DEFAULT "mixer"
#define EMSESP_DEBUG_DEFAULT "mixer"
// #define EMSESP_DEBUG_DEFAULT "web"
// #define EMSESP_DEBUG_DEFAULT "mqtt"
// #define EMSESP_DEBUG_DEFAULT "general"
Expand All @@ -52,7 +52,7 @@ namespace emsesp {
// #define EMSESP_DEBUG_DEFAULT "mqtt_post"
// #define EMSESP_DEBUG_DEFAULT "api_wwmode"
// #define EMSESP_DEBUG_DEFAULT "custom"
#define EMSESP_DEBUG_DEFAULT "dump"
// #define EMSESP_DEBUG_DEFAULT "dump"

class Test {
public:
Expand Down

0 comments on commit 6c09134

Please sign in to comment.