Merge branch 'revert-dc724a2c' into 'master'
Revert "Merged updates from dev branch into master" See merge request mraureliusr/mqtt-esp8266!2
This commit is contained in:
commit
fdac75a728
2 changed files with 7 additions and 9 deletions
11
main.c
11
main.c
|
@ -121,8 +121,8 @@ LOCAL void ICACHE_FLASH_ATTR dataLog(void *arg) {
|
|||
void ICACHE_FLASH_ATTR user_init() {
|
||||
LOCAL mqtt_session_t globalSession;
|
||||
LOCAL mqtt_session_t *pGlobalSession = &globalSession;
|
||||
char passkey[64] = "yourwifipass";
|
||||
char ssid[32] = "yourwifissid";
|
||||
char passkey[64] = "yourwifipass";
|
||||
struct station_config stationConf;
|
||||
|
||||
gpio_init(); // init gpio so we can use the LED & onewire bus
|
||||
|
@ -137,15 +137,14 @@ void ICACHE_FLASH_ATTR user_init() {
|
|||
// prepare the TCP/MQTT connection stuff
|
||||
// Adafruit IO is at 52.5.238.97
|
||||
// use strtoarr.py to generate these
|
||||
static const char ioUser[11] = { 0x4d, 0x72, 0x41, 0x75, 0x72, 0x65, 0x6c, 0x69, 0x75, 0x73, 0x52 }; // MrAureliusR
|
||||
static const uint8_t ioUser_len = 11;
|
||||
static const char ioUser[ioUser_len] = { 0x4d, 0x72, 0x41, 0x75, 0x72, 0x65, 0x6c, 0x69, 0x75, 0x73, 0x52 }; // MrAureliusR
|
||||
static const char ioKey[32] = { }; // use strtoarr.py to generate these
|
||||
static const uint8_t ioKey_len = 32;
|
||||
static const char ioKey[ioKey_len] = { };
|
||||
static const char ioTopic[27] = { 0x4d, 0x72, 0x41, 0x75, 0x72, 0x65, 0x6c, 0x69, 0x75, 0x73, 0x52, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x74, 0x6f, 0x70, 0x69, 0x63 }; // MrAureliusR/feeds/testtopic
|
||||
static const uint8_t ioTopic_len = 27;
|
||||
static const char ioTopic[ioTopic_len] = { 0x4d, 0x72, 0x41, 0x75, 0x72, 0x65, 0x6c, 0x69, 0x75, 0x73, 0x52, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x74, 0x6f, 0x70, 0x69, 0x63 }; // MrAureliusR/feeds/testtopic
|
||||
static const char clientID[5] = { 0x46, 0x52, 0x5a, 0x4e, 0x30 }; // FRZN0
|
||||
static const uint8_t clientID_len = 5;
|
||||
static const char clientID[clientID_len] = { 0x46, 0x52, 0x5a, 0x4e, 0x30 }; // FRZN0
|
||||
|
||||
pGlobalSession->port = 1883; // mqtt port
|
||||
static const char adafruitIO_ip[4] = {52, 5, 238, 97};
|
||||
|
||||
|
|
|
@ -21,8 +21,7 @@ import os
|
|||
|
||||
inString = str(sys.argv[1]);
|
||||
|
||||
print("static const uint8_t {0}_len = {1};".format(sys.argv[2], len(inString)))
|
||||
print("static const char {0}[{0}_len] = {{ ".format(sys.argv[2], len(inString)), end='')
|
||||
print("static const char {0}[{1}] = {{ ".format(sys.argv[2], len(inString)), end='')
|
||||
for letter in inString[:-1]:
|
||||
p = ord(letter)
|
||||
print("{0:#x}, ".format(p), end='')
|
||||
|
@ -30,4 +29,4 @@ for letter in inString[:-1]:
|
|||
p = ord(inString[-1])
|
||||
print("{0:#x} ".format(int(p)), end='')
|
||||
print("}; // " + inString)
|
||||
|
||||
print("static const uint8_t {0}_len = {1};".format(sys.argv[2], len(inString)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue