Merge pull request #772 from cyberman54/development

Development
This commit is contained in:
Verkehrsrot 2021-03-27 19:03:31 +01:00 committed by GitHub
commit e015d399c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 522 additions and 510 deletions

View File

@ -530,8 +530,8 @@ Send for example `8386` as Downlink on Port 2 to get battery status and time/dat
0x19 set sleep cycle
0 ... 255 device sleep cycle in seconds/2
e.g. 120 -> device sleeps 240 seconds after each send cycle [default = 0]
bytes 1..2 = device sleep cycle in seconds/10 (MSB)
e.g. {0x04, 0xB0} -> device sleeps 20 minutes after each send cycle [default = 0]
0x20 load device configuration
@ -579,10 +579,13 @@ Send for example `8386` as Downlink on Port 2 to get battery status and time/dat
0x01 = timeNeedsSync (last sync failed)
0x02 = timeSet (synched)
0x87 set time/date
0x87 sync time/date
Device synchronizes it's time/date by calling the preconfigured time source.
0x88 set time/date
bytes 1..4 = time/date to set in UTC epoch seconds (MSB, e.g. https://www.epochconverter.com/hex)
# License

View File

@ -74,7 +74,7 @@ typedef struct __attribute__((packed)) {
uint8_t countermode; // 0=cyclic unconfirmed, 1=cumulative, 2=cyclic confirmed
int16_t rssilimit; // threshold for rssilimiter, negative value!
uint8_t sendcycle; // payload send cycle [seconds/2]
uint8_t sleepcycle; // sleep cycle [seconds/2]
uint16_t sleepcycle; // sleep cycle [seconds/10]
uint8_t wifichancycle; // wifi channel switch cycle [seconds/100]
uint8_t blescantime; // BLE scan cycle duration [seconds]
uint8_t blescan; // 0=disabled, 1=enabled

View File

@ -25,7 +25,7 @@
"t": "set",
"p": "payload.schedule",
"pt": "msg",
"to": "replace",
"to": "first",
"tot": "str"
},
{

View File

@ -42,7 +42,7 @@ static void defaultConfig(configData_t *myconfig) {
COUNTERMODE; // 0=cyclic, 1=cumulative, 2=cyclic confirmed
myconfig->rssilimit = 0; // threshold for rssilimiter, negative value!
myconfig->sendcycle = SENDCYCLE; // payload send cycle [seconds/2]
myconfig->sleepcycle = SLEEPCYCLE; // sleep cycle [seconds/2]
myconfig->sleepcycle = SLEEPCYCLE; // sleep cycle [seconds/10]
myconfig->wifichancycle =
WIFI_CHANNEL_SWITCH_INTERVAL; // wifi channel switch cycle [seconds/100]
myconfig->blescantime =

View File

@ -90,9 +90,9 @@ void irqHandler(void *pvParameters) {
// goto sleep if we have a sleep cycle
if (cfg.sleepcycle)
#ifdef HAS_BUTTON
enter_deepsleep(cfg.sleepcycle * 2, (gpio_num_t)HAS_BUTTON);
enter_deepsleep(cfg.sleepcycle * 10, (gpio_num_t)HAS_BUTTON);
#else
enter_deepsleep(cfg.sleepcycle * 2);
enter_deepsleep(cfg.sleepcycle * 10);
#endif
}
} // for

View File

@ -14,13 +14,13 @@
// Payload send cycle and encoding
#define SENDCYCLE 30 // payload send cycle [seconds/2], 0 .. 255
#define SLEEPCYCLE 0 // sleep time after a send cycle [seconds/2], 0 .. 255; 0 means no sleep [default = 0]
#define SLEEPCYCLE 0 // sleep time after a send cycle [seconds/10], 0 .. 65535; 0 means no sleep [default = 0]
#define PAYLOAD_ENCODER 2 // payload encoder: 1=Plain, 2=Packed, 3=Cayenne LPP dynamic, 4=Cayenne LPP packed
#define COUNTERMODE 0 // 0=cyclic, 1=cumulative, 2=cyclic confirmed
// MAC sniffing parameters
#define MACFILTER 1 // set to 0 if you want to scan all devices, 1 to scan only devices with random MACs (aka smartphones) [default = 1]
#define BLECOUNTER 0 // set to 0 if you do not want to install the BLE sniffer
#define BLECOUNTER 1 // set to 0 if you do not want to install the BLE sniffer
#define WIFICOUNTER 1 // set to 0 if you do not want to install the WIFI sniffer
#define MAC_QUEUE_SIZE 50 // size of MAC processing buffer (number of MACs) [default = 50]

File diff suppressed because it is too large Load Diff