mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 00:04:28 +01:00
Squashed commit of the following:
commitd41ab4b27cAuthor: Nic Limper <nic@xs4all.nl> Date: Mon Mar 4 13:16:15 2024 +0100 remove subghz in platformio.ini commitdfa1a5cecdAuthor: Nic Limper <nic@xs4all.nl> Date: Mon Mar 4 13:15:14 2024 +0100 Revert "Disable SubGhz support until C6 side is ready." This reverts commit3bc96dc48e. commitcdd26072fdAuthor: Nic Limper <nic@xs4all.nl> Date: Mon Mar 4 13:14:46 2024 +0100 Revert "Merge remote-tracking branch 'mine/oepl_pr_1' into oepl_pr_1" This reverts commit39b1938263, reversing changes made to3bc96dc48e. commit39b1938263Merge:3bc96dc42b62dff5Author: Skip Hansen <skip@gfrn.org> Date: Mon Mar 4 03:54:35 2024 -0800 Merge remote-tracking branch 'mine/oepl_pr_1' into oepl_pr_1 commit3bc96dc48eAuthor: Skip Hansen <skip@gfrn.org> Date: Mon Mar 4 03:43:12 2024 -0800 Disable SubGhz support until C6 side is ready. commit2b62dff5f5Author: Nic Limper <nic@xs4all.nl> Date: Mon Mar 4 11:44:06 2024 +0100 fix gzip wwwfiles to prevent unchanged gzipped files showing up in the commit commit0864870540Author: Skip Hansen <skip@gfrn.org> Date: Sun Mar 3 16:46:53 2024 -0800 Added SubGhz channel support to AP Web GUI.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -54,6 +54,7 @@ class tagRecord {
|
|||||||
|
|
||||||
struct Config {
|
struct Config {
|
||||||
uint8_t channel;
|
uint8_t channel;
|
||||||
|
uint8_t subghzchannel;
|
||||||
char alias[32];
|
char alias[32];
|
||||||
uint8_t led;
|
uint8_t led;
|
||||||
uint8_t tft;
|
uint8_t tft;
|
||||||
|
|||||||
@@ -640,8 +640,11 @@ void setAPchannel() {
|
|||||||
udpsync.getAPList();
|
udpsync.getAPList();
|
||||||
} else {
|
} else {
|
||||||
if (curChannel.channel != config.channel) {
|
if (curChannel.channel != config.channel) {
|
||||||
curChannel.channel = config.channel;
|
curChannel.channel = config.channel;
|
||||||
sendChannelPower(&curChannel);
|
#ifdef HAS_SUBGHZ
|
||||||
|
curChannel.subghzchannel = config.subghzchannel;
|
||||||
|
#endif
|
||||||
|
sendChannelPower(&curChannel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,6 +315,7 @@ void initAPconfig() {
|
|||||||
configFile.close();
|
configFile.close();
|
||||||
}
|
}
|
||||||
config.channel = APconfig.containsKey("channel") ? APconfig["channel"] : 0;
|
config.channel = APconfig.containsKey("channel") ? APconfig["channel"] : 0;
|
||||||
|
config.subghzchannel = APconfig.containsKey("subghzchannel") ? APconfig["subghzchannel"] : 0;
|
||||||
if (APconfig["alias"]) strlcpy(config.alias, APconfig["alias"], sizeof(config.alias));
|
if (APconfig["alias"]) strlcpy(config.alias, APconfig["alias"], sizeof(config.alias));
|
||||||
config.led = APconfig.containsKey("led") ? APconfig["led"] : 255;
|
config.led = APconfig.containsKey("led") ? APconfig["led"] : 255;
|
||||||
config.tft = APconfig.containsKey("tft") ? APconfig["tft"] : 255;
|
config.tft = APconfig.containsKey("tft") ? APconfig["tft"] : 255;
|
||||||
@@ -343,6 +344,7 @@ void saveAPconfig() {
|
|||||||
fs::File configFile = contentFS->open("/current/apconfig.json", "w");
|
fs::File configFile = contentFS->open("/current/apconfig.json", "w");
|
||||||
DynamicJsonDocument APconfig(500);
|
DynamicJsonDocument APconfig(500);
|
||||||
APconfig["channel"] = config.channel;
|
APconfig["channel"] = config.channel;
|
||||||
|
APconfig["subghzchannel"] = config.subghzchannel;
|
||||||
APconfig["alias"] = config.alias;
|
APconfig["alias"] = config.alias;
|
||||||
APconfig["led"] = config.led;
|
APconfig["led"] = config.led;
|
||||||
APconfig["tft"] = config.tft;
|
APconfig["tft"] = config.tft;
|
||||||
|
|||||||
@@ -509,6 +509,13 @@ void init_web() {
|
|||||||
#else
|
#else
|
||||||
response->print("\"hasBLE\": \"0\", ");
|
response->print("\"hasBLE\": \"0\", ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAS_SUBGHZ
|
||||||
|
response->print("\"hasSubGhz\": \"1\", ");
|
||||||
|
#else
|
||||||
|
response->print("\"hasSubGhz\": \"0\", ");
|
||||||
|
#endif
|
||||||
|
|
||||||
response->print("\"apstate\": \"" + String(apInfo.state) + "\"");
|
response->print("\"apstate\": \"" + String(apInfo.state) + "\"");
|
||||||
|
|
||||||
File configFile = contentFS->open("/current/apconfig.json", "r");
|
File configFile = contentFS->open("/current/apconfig.json", "r");
|
||||||
@@ -542,6 +549,9 @@ void init_web() {
|
|||||||
if (request->hasParam("channel", true)) {
|
if (request->hasParam("channel", true)) {
|
||||||
config.channel = static_cast<uint8_t>(request->getParam("channel", true)->value().toInt());
|
config.channel = static_cast<uint8_t>(request->getParam("channel", true)->value().toInt());
|
||||||
}
|
}
|
||||||
|
if (request->hasParam("subghzchannel", true)) {
|
||||||
|
config.subghzchannel = static_cast<uint8_t>(request->getParam("subghzchannel", true)->value().toInt());
|
||||||
|
}
|
||||||
if (request->hasParam("led", true)) {
|
if (request->hasParam("led", true)) {
|
||||||
config.led = static_cast<uint8_t>(request->getParam("led", true)->value().toInt());
|
config.led = static_cast<uint8_t>(request->getParam("led", true)->value().toInt());
|
||||||
updateBrightnessFromConfig();
|
updateBrightnessFromConfig();
|
||||||
|
|||||||
@@ -289,6 +289,24 @@ options:
|
|||||||
<option value="27">27</option>
|
<option value="27">27</option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
|
<p title="Enable SubGhz support and select channel. This requires an AP that has an optional CC1101 SubGhz radio module attached.">
|
||||||
|
<label for="apcfgsubgigchid">SubGhz channel</label>
|
||||||
|
<select id="apcfgsubgigchid">
|
||||||
|
<option value="0" selected>disabled</option>
|
||||||
|
<option value="100">100 - 864.000 Mhz (Europe, etc)</option>
|
||||||
|
<option value="101">101 - 865.006 Mhz (Europe, etc)</option>
|
||||||
|
<option value="102">102 - 866.014 Mhz (Europe, etc)</option>
|
||||||
|
<option value="103">103 - 867.020 Mhz (Europe, etc)</option>
|
||||||
|
<option value="104">104 - 868.027 Mhz (Europe, etc)</option>
|
||||||
|
<option value="105">105 - 869.034 Mhz (Europe, etc)</option>
|
||||||
|
<option value="200">200 - 903.000 Mhz (US, etc)</option>
|
||||||
|
<option value="201">201 - 907.027 Mhz (US, etc)</option>
|
||||||
|
<option value="202">202 - 911.054 Mhz (US, etc)</option>
|
||||||
|
<option value="203">203 - 915.083 Mhz (US, etc)</option>
|
||||||
|
<option value="204">204 - 919.110 Mhz (US, etc)</option>
|
||||||
|
<option value="205">205 - 923.138 Mhz (US, etc)</option>
|
||||||
|
</select>
|
||||||
|
</p>
|
||||||
<p title="Enable Bluetooth (BLE) support. Only enable this if you have BLE capable tags. Changing this value requires a reboot to take effect.">
|
<p title="Enable Bluetooth (BLE) support. Only enable this if you have BLE capable tags. Changing this value requires a reboot to take effect.">
|
||||||
<label for="apcfgble">Bluetooth</label>
|
<label for="apcfgble">Bluetooth</label>
|
||||||
<select id="apcfgble">
|
<select id="apcfgble">
|
||||||
|
|||||||
@@ -64,6 +64,9 @@ window.addEventListener("loadConfig", function () {
|
|||||||
if (data.hasBLE == 0) {
|
if (data.hasBLE == 0) {
|
||||||
$("#apcfgble").parentNode.style.display = 'none';
|
$("#apcfgble").parentNode.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
if (data.hasSubGhz == 0) {
|
||||||
|
$("#apcfgsubgigchid").parentNode.style.display = 'none';
|
||||||
|
}
|
||||||
if (data.savespace) {
|
if (data.savespace) {
|
||||||
}
|
}
|
||||||
if (data.apstate) {
|
if (data.apstate) {
|
||||||
@@ -730,6 +733,7 @@ document.addEventListener("loadTab", function (event) {
|
|||||||
apConfig = data;
|
apConfig = data;
|
||||||
$('#apcfgalias').value = data.alias;
|
$('#apcfgalias').value = data.alias;
|
||||||
$('#apcfgchid').value = data.channel;
|
$('#apcfgchid').value = data.channel;
|
||||||
|
$('#apcfgsubgigchid').value = data.subghzchannel;
|
||||||
$('#apcfgble').value = data.ble;
|
$('#apcfgble').value = data.ble;
|
||||||
$("#apcfgledbrightness").value = data.led;
|
$("#apcfgledbrightness").value = data.led;
|
||||||
$("#apcfgtftbrightness").value = data.tft;
|
$("#apcfgtftbrightness").value = data.tft;
|
||||||
@@ -765,6 +769,7 @@ $('#apcfgsave').onclick = function () {
|
|||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append("alias", $('#apcfgalias').value);
|
formData.append("alias", $('#apcfgalias').value);
|
||||||
formData.append("channel", $('#apcfgchid').value);
|
formData.append("channel", $('#apcfgchid').value);
|
||||||
|
formData.append("subghzchannel", $('#apcfgsubgigchid').value);
|
||||||
formData.append('ble', $('#apcfgble').value);
|
formData.append('ble', $('#apcfgble').value);
|
||||||
formData.append('led', $('#apcfgledbrightness').value);
|
formData.append('led', $('#apcfgledbrightness').value);
|
||||||
formData.append('tft', $('#apcfgtftbrightness').value);
|
formData.append('tft', $('#apcfgtftbrightness').value);
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ struct espSetChannelPower {
|
|||||||
uint8_t checksum;
|
uint8_t checksum;
|
||||||
uint8_t channel;
|
uint8_t channel;
|
||||||
uint8_t power;
|
uint8_t power;
|
||||||
|
#ifdef HAS_SUBGHZ
|
||||||
|
uint8_t subghzchannel;
|
||||||
|
#endif
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct espAvailDataReq {
|
struct espAvailDataReq {
|
||||||
|
|||||||
Reference in New Issue
Block a user