From 0014fe1b227d127c19772d8efa16b8a5e8a09eeb Mon Sep 17 00:00:00 2001 From: Github Actions Date: Tue, 13 Feb 2024 17:19:00 +0000 Subject: [PATCH] Deploy updated documentation --- CLI_8cpp.html | 4 + CLI_8cpp_source.html | 301 +++++++++++++++-------------- Device_8cpp_source.html | 142 ++++++++------ Device_8h.html | 2 +- OOKwiz_8cpp_source.html | 241 +++++++++++------------ Radio_8cpp_source.html | 379 ++++++++++++++++++++----------------- Radio_8h.html | 2 +- Settings_8cpp_source.html | 2 +- classDevice.html | 79 +++++++- classOOKwiz.html | 8 +- classRadio.html | 126 ++++++++++-- namespaceCLI.html | 46 ++++- namespacemembers.html | 6 + namespacemembers_func.html | 3 + namespacemembers_vars.html | 3 + namespacetools.html | 29 ++- search/all_10.js | 44 ++--- search/all_11.js | 4 +- search/all_12.js | 4 +- search/all_13.js | 2 +- search/all_e.js | 9 +- search/all_f.js | 57 +++--- search/classes_0.js | 2 +- search/classes_1.js | 2 +- search/classes_2.js | 4 +- search/classes_3.js | 2 +- search/classes_4.js | 4 +- search/classes_5.js | 4 +- search/classes_6.js | 2 +- search/defines_0.js | 2 +- search/defines_1.js | 8 +- search/defines_2.js | 6 +- search/defines_3.js | 4 +- search/defines_4.js | 2 +- search/defines_5.js | 16 +- search/defines_6.js | 2 +- search/defines_7.js | 12 +- search/defines_8.js | 4 +- search/defines_9.js | 8 +- search/defines_a.js | 14 +- search/enums_0.js | 2 +- search/enumvalues_0.js | 2 +- search/enumvalues_1.js | 6 +- search/enumvalues_2.js | 2 +- search/files_0.js | 8 +- search/files_1.js | 4 +- search/files_2.js | 4 +- search/files_3.js | 4 +- search/files_4.js | 4 +- search/files_5.js | 8 +- search/files_6.js | 8 +- search/files_7.js | 4 +- search/functions_0.js | 10 +- search/functions_1.js | 4 +- search/functions_2.js | 14 +- search/functions_3.js | 12 +- search/functions_4.js | 4 +- search/functions_5.js | 8 +- search/functions_6.js | 2 +- search/functions_7.js | 6 +- search/functions_8.js | 4 +- search/functions_9.js | 6 +- search/functions_a.js | 17 +- search/functions_b.js | 26 +-- search/functions_c.js | 16 +- search/functions_d.js | 2 +- search/functions_e.js | 4 +- search/functions_f.js | 2 +- search/namespaces_0.js | 2 +- search/namespaces_1.js | 2 +- search/typedefs_0.js | 2 +- search/typedefs_1.js | 4 +- search/typedefs_2.js | 2 +- search/variables_0.js | 2 +- search/variables_1.js | 6 +- search/variables_2.js | 6 +- search/variables_3.js | 8 +- search/variables_4.js | 2 +- search/variables_5.js | 4 +- search/variables_6.js | 2 +- search/variables_7.js | 2 +- search/variables_8.js | 4 +- search/variables_9.js | 4 +- search/variables_a.js | 2 +- search/variables_b.js | 8 +- search/variables_c.js | 8 +- search/variables_d.js | 9 +- search/variables_e.js | 22 +-- tools_8cpp.html | 2 + tools_8cpp_source.html | 52 +++-- tools_8h.html | 4 +- 91 files changed, 1149 insertions(+), 794 deletions(-) diff --git a/CLI_8cpp.html b/CLI_8cpp.html index c647e02..6ee056f 100644 --- a/CLI_8cpp.html +++ b/CLI_8cpp.html @@ -101,6 +101,8 @@ Functions void CLI::parse (String cmd)   +void CLI::RFlinkParse (String cmd) +  void CLI::loop ()   @@ -108,6 +110,8 @@ Variables + +
bool CLI::cli_start_msg_printed = false
 
bool CLI::semicolon_parsing = true
 
String CLI::serial_buffer
 
diff --git a/CLI_8cpp_source.html b/CLI_8cpp_source.html index f364e86..9d5680d 100644 --- a/CLI_8cpp_source.html +++ b/CLI_8cpp_source.html @@ -90,149 +90,172 @@
18 namespace CLI {
19 
20  bool cli_start_msg_printed = false;
-
21  String serial_buffer;
-
22  void parse(String cmd);
-
23 
-
24  void loop() {
-
25  if (!cli_start_msg_printed) {
-
26  INFO("CLI started on Serial. Type 'help' for list of commands.\n");
-
27  cli_start_msg_printed = true;
-
28  }
-
29  while (Serial.available()) {
-
30  char inp = Serial.read();
-
31  if (inp == char(13) || inp == char(10) || inp == ';') {
-
32  tools::trim(serial_buffer);
-
33  if (serial_buffer != "") {
-
34  parse(serial_buffer);
-
35  }
-
36  serial_buffer = "";
-
37  } else {
-
38  serial_buffer += inp;
-
39  }
-
40  }
-
41  }
-
42 
-
43  void parse(String cmd) {
-
44 
-
45  String args;
-
46  String tmp;
-
47 
-
48  INFO("\nCLI: %s\n", cmd.c_str());
-
49 
-
50  COMMAND("help")
-
51 INFO(R"(
-
52 OOKwiz version %s Command Line Interpreter help.
+
21  bool semicolon_parsing = true;
+
22  String serial_buffer;
+
23  void parse(String cmd);
+
24  void RFlinkParse(String cmd);
+
25 
+
26  void loop() {
+
27  if (!cli_start_msg_printed) {
+
28  INFO("CLI started on Serial. Type 'help' for list of commands.\n");
+
29  cli_start_msg_printed = true;
+
30  }
+
31  while (Serial.available()) {
+
32  char inp = Serial.read();
+
33  if (inp == ';' && serial_buffer == "10") {
+
34  // RFlink format uses semicolons, so when command starts with "10;",keep it together until eol
+
35  semicolon_parsing = false;
+
36  }
+
37  if (inp == char(13) || inp == char(10) || (inp == ';' && semicolon_parsing)) {
+
38  semicolon_parsing = true;
+
39  tools::trim(serial_buffer);
+
40  if (serial_buffer != "") {
+
41  if (serial_buffer.startsWith("10;")) {
+
42  RFlinkParse(serial_buffer);
+
43  } else {
+
44  parse(serial_buffer);
+
45  }
+
46  }
+
47  serial_buffer = "";
+
48  } else {
+
49  serial_buffer += inp;
+
50  }
+
51  }
+
52  }
53 
-
54 Available commands:
+
54  void parse(String cmd) {
55 
-
56 help - prints this message
-
57 set - shows current configuration settings
-
58 set x - sets configuration flag x
-
59 set x y - sets configuration value x to y
-
60 unset x - unsets a flag or variable
-
61 load [<file>] - loads the default saved settings, or from a named file in flash
-
62 save - saves to a file named 'default', which is what is used at boot time.
-
63 save [<file>] - saves the settings to a named file in SPIFFS flash
-
64 ls - lists stored configuration files in SPIFFS flash
-
65 rm <file> - deletes a configuration file
-
66 reboot - reboot using the saved defaults
-
67 standby - set radio to standby mode
-
68 receive - set radio to receive mode
-
69 sim <string> - Takes a RawTimings, Pulsetrain or Meaning string representation and
-
70  acts like it just came in off the air.
-
71 transmit <string> - Takes a RawTimings, Pulsetrain or Meaning string representation and
-
72  transmits it.
-
73 
-
74 rm default;reboot - restore factory settings
-
75 sr - shorthand for "save;reboot"
-
76 
-
77 
-
78 See the OOKwiz README.md on GitHub for a quick-start guide and full documentation
-
79 
-
80 )", OOKWIZ_VERSION);
-
81  END_CMD
-
82 
-
83  COMMAND("set")
-
84  if (args == "") {
-
85  INFO("%s\n", Settings::list().c_str());
-
86  return;
-
87  }
-
88  SPLIT(args, " ", name, value);
-
89  // Works both with 'set x y' and 'set x=y'
-
90  if (value == "") {
-
91  tools::split(args, "=", name, value);
-
92  }
-
93  if (Settings::set(name, value)) {
-
94  if (value != "") {
-
95  INFO("'%s' set to '%s'\n", name.c_str(), value.c_str());
-
96  } else {
-
97  INFO("'%s' set\n", name.c_str());
-
98  }
-
99  }
-
100  END_CMD
-
101 
-
102  COMMAND("unset")
-
103  if (Settings::unset(args)) {
-
104  INFO("Setting '%s' removed.\n", args.c_str());
-
105  }
-
106  END_CMD
-
107 
-
108  COMMAND("load")
-
109  if (args == "") {
-
110  args = "default";
-
111  }
-
112  Settings::load(args);
-
113  END_CMD
-
114 
-
115  COMMAND("save")
-
116  if (args == "") {
-
117  args = "default";
-
118  }
-
119  Settings::save(args);
-
120  END_CMD
-
121 
-
122  COMMAND("ls")
-
123  Settings::ls();
+
56  String args;
+
57  String tmp;
+
58 
+
59  INFO("\nCLI: %s\n", cmd.c_str());
+
60 
+
61  COMMAND("help")
+
62 INFO(R"(
+
63 OOKwiz version %s Command Line Interpreter help.
+
64 
+
65 Available commands:
+
66 
+
67 help - prints this message
+
68 set - shows current configuration settings
+
69 set x - sets configuration flag x
+
70 set x y - sets configuration value x to y
+
71 unset x - unsets a flag or variable
+
72 load [<file>] - loads the default saved settings, or from a named file in flash
+
73 save - saves to a file named 'default', which is what is used at boot time.
+
74 save [<file>] - saves the settings to a named file in SPIFFS flash
+
75 ls - lists stored configuration files in SPIFFS flash
+
76 rm <file> - deletes a configuration file
+
77 reboot - reboot using the saved defaults
+
78 standby - set radio to standby mode
+
79 receive - set radio to receive mode
+
80 sim <string> - Takes a RawTimings, Pulsetrain or Meaning string representation and
+
81  acts like it just came in off the air.
+
82 transmit <string> - Takes a RawTimings, Pulsetrain or Meaning string representation and
+
83  transmits it.
+
84 
+
85 rm default;reboot - restore factory settings
+
86 sr - shorthand for "save;reboot"
+
87 
+
88 
+
89 See the OOKwiz README.md on GitHub for a quick-start guide and full documentation
+
90 
+
91 )", OOKWIZ_VERSION);
+
92  END_CMD
+
93 
+
94  COMMAND("set")
+
95  if (args == "") {
+
96  INFO("%s\n", Settings::list().c_str());
+
97  return;
+
98  }
+
99  SPLIT(args, " ", name, value);
+
100  // Works both with 'set x y' and 'set x=y'
+
101  if (value == "") {
+
102  tools::split(args, "=", name, value);
+
103  }
+
104  if (Settings::set(name, value)) {
+
105  if (value != "") {
+
106  INFO("'%s' set to '%s'\n", name.c_str(), value.c_str());
+
107  } else {
+
108  INFO("'%s' set\n", name.c_str());
+
109  }
+
110  }
+
111  END_CMD
+
112 
+
113  COMMAND("unset")
+
114  if (Settings::unset(args)) {
+
115  INFO("Setting '%s' removed.\n", args.c_str());
+
116  }
+
117  END_CMD
+
118 
+
119  COMMAND("load")
+
120  if (args == "") {
+
121  args = "default";
+
122  }
+
123  Settings::load(args);
124  END_CMD
125 
-
126  COMMAND("rm")
-
127  Settings::rm(args);
-
128  END_CMD
-
129 
-
130  COMMAND("reboot")
-
131  ESP.restart();
-
132  END_CMD
-
133 
-
134  COMMAND("receive")
-
135  if (OOKwiz::receive()) {
-
136  INFO("Receiver active, waiting for pulses.\n");
-
137  }
-
138  END_CMD
-
139 
-
140  COMMAND("standby")
-
141  if (OOKwiz::standby()) {
-
142  INFO("Transceiver placed in standby mode.\n");
-
143  }
-
144  END_CMD
-
145 
-
146  COMMAND("transmit")
-
147  OOKwiz::transmit(args);
-
148  END_CMD
-
149 
-
150  COMMAND("sim")
-
151  OOKwiz::simulate(args);
-
152  END_CMD
-
153 
-
154  COMMAND("sr")
-
155  if (Settings::save("default")) {
-
156  ESP.restart();
-
157  }
-
158  END_CMD
-
159 
-
160  INFO("Unknown command '%s'. Enter 'help' for a list of commands.\n", cmd.c_str());
-
161  }
-
162 
-
163 }
+
126  COMMAND("save")
+
127  if (args == "") {
+
128  args = "default";
+
129  }
+
130  Settings::save(args);
+
131  END_CMD
+
132 
+
133  COMMAND("ls")
+
134  Settings::ls();
+
135  END_CMD
+
136 
+
137  COMMAND("rm")
+
138  Settings::rm(args);
+
139  END_CMD
+
140 
+
141  COMMAND("reboot")
+
142  ESP.restart();
+
143  END_CMD
+
144 
+
145  COMMAND("receive")
+
146  if (OOKwiz::receive()) {
+
147  INFO("Receiver active, waiting for pulses.\n");
+
148  }
+
149  END_CMD
+
150 
+
151  COMMAND("standby")
+
152  if (OOKwiz::standby()) {
+
153  INFO("Transceiver placed in standby mode.\n");
+
154  }
+
155  END_CMD
+
156 
+
157  COMMAND("transmit")
+
158  OOKwiz::transmit(args);
+
159  END_CMD
+
160 
+
161  COMMAND("sim")
+
162  OOKwiz::simulate(args);
+
163  END_CMD
+
164 
+
165  COMMAND("sr")
+
166  if (Settings::save("default")) {
+
167  ESP.restart();
+
168  }
+
169  END_CMD
+
170 
+
171  INFO("Unknown command '%s'. Enter 'help' for a list of commands.\n", cmd.c_str());
+
172  }
+
173 
+
174  void RFlinkParse(String cmd) {
+
175  INFO("\nCLI: %s\n", cmd.c_str());
+
176  cmd = cmd.substring(3); // get rid of "10;"
+
177 
+
178  // This may parse further commands later, now it just assumes the first term in semicolons
+
179  // after "10;" is a plugin name and the rest is what is to be transmitted.
+
180  String plugin_name;
+
181  String txString;
+
182  tools::split(cmd, ";", plugin_name, txString);
+
183  Device::transmit(plugin_name, txString);
+
184  }
+
185 
+
186 }