Fix for services page syslog filter select list

Fix for a couple compiler errors when cycling the different undef and define options in user_config.h
pull/72/head
Benjamin Runnels 9 years ago
parent a6a8866bfe
commit f8eb8b33e0
  1. 2
      esp-link/cgiservices.c
  2. 1
      esp-link/cgiwifi.c
  3. 6
      html/services.js
  4. 24
      mqtt/pktbuf.c

@ -98,7 +98,7 @@ void ICACHE_FLASH_ATTR cgiServicesSNTPInit() {
sntp_setservername(0, flashConfig.sntp_server);
sntp_init();
}
DBG("SNTP timesource set to %s with offset %d", flashConfig.sntp_server, flashConfig.timezone_offset);
DBG("SNTP timesource set to %s with offset %d\n", flashConfig.sntp_server, flashConfig.timezone_offset);
}
}

@ -619,6 +619,7 @@ int ICACHE_FLASH_ATTR cgiWifiInfo(HttpdConnData *connData) {
void ICACHE_FLASH_ATTR wifiInit() {
// wifi_set_phy_mode(2); // limit to 802.11b/g 'cause n is flaky
int x = wifi_get_opmode() & 0x3;
x = x;
DBG("Wifi init, mode=%s\n", wifiMode[x]);
configWifiIP();

@ -1,7 +1,7 @@
function changeServices(e) {
e.preventDefault();
var url = "services/update?1=1";
var i, inputs = document.querySelectorAll("#" + e.srcElement.id + " input");
var i, inputs = document.querySelectorAll("#" + e.srcElement.id + " input,select");
for (i = 0; i < inputs.length; i++) {
if (inputs[i].type == "checkbox") {
if (inputs[i].name.slice(-6) == "enable")
@ -35,7 +35,11 @@ function displayServices(data) {
else el.innerHTML = data[v];
return;
}
el = document.querySelector('input[name="' + v + '"]');
if (el == null)
el = document.querySelector('select[name="' + v + '"]');
if (el != null) {
if (el.type == "checkbox") {
el.checked = data[v] == "enabled";

@ -4,18 +4,18 @@
#include "pktbuf.h"
#ifdef PKTBUF_DBG
static void ICACHE_FLASH_ATTR
PktBuf_Print(PktBuf *buf) {
os_printf("PktBuf:");
for (int i=-16; i<0; i++)
os_printf(" %02X", ((uint8_t*)buf)[i]);
os_printf(" %p", buf);
for (int i=0; i<16; i++)
os_printf(" %02X", ((uint8_t*)buf)[i]);
os_printf("\n");
os_printf("PktBuf: next=%p len=0x%04x\n",
((void**)buf)[-4], ((uint16_t*)buf)[-6]);
}
//static void ICACHE_FLASH_ATTR
//PktBuf_Print(PktBuf *buf) {
// os_printf("PktBuf:");
// for (int i=-16; i<0; i++)
// os_printf(" %02X", ((uint8_t*)buf)[i]);
// os_printf(" %p", buf);
// for (int i=0; i<16; i++)
// os_printf(" %02X", ((uint8_t*)buf)[i]);
// os_printf("\n");
// os_printf("PktBuf: next=%p len=0x%04x\n",
// ((void**)buf)[-4], ((uint16_t*)buf)[-6]);
//}
#endif

Loading…
Cancel
Save