Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Chris Dalby
@moose4621
Yeah thanks very much for those links. I finally went with http://django-websocket-redis.readthedocs.io/en/latest/heartbeats.html and although the javascript needed adapting I managed to get it to work and now a warning popup appears to alert the operator. All done!
den har
@denman0000_gitlab
I have managed to assemble (collect) the string on button click on client side and javascript now sends it to server and I used the examplle you sent to PRINTF in the console ... All I'm trying to do now is take that output and send it to SPIFFS
@moose4621 WOW man you are rocking this rice paddy :-) well done
Chris Dalby
@moose4621
@denman0000_gitlab Lol, yeah I'm feeling good atm. Can you give my an idea of whats in the message at the server end?
den har
@denman0000_gitlab
@moose4621 that's awesome :-) glad to hear it .. yes re data
standbuy
standby
Chris Dalby
@moose4621
@denman0000_gitlab kml file might be next for me which is in parrallel with your projct but kml formatting is a killer.
@denman0000_gitlab Just found a library for writing kml files in arduino. Yay.
den har
@denman0000_gitlab
@moose motor,outside,2018-06-18 12:00,1529316000,2018-06-19 12:00,1529402400,Normal,0001,0001
Chris Dalby
@moose4621
@denman0000_gitlab Ok, thanks. I might have a play with it tonight after work if you haven't already soughted it out. Do you have your code on github?
den har
@denman0000_gitlab
@moose4621 Negative re github .. its all over the place at the mo .. will see how to get it on git and then go from there and structure it ...it's spaghetti code at the mo LOL
@moose4621 wow ok re KML .. you did mention the geolocation stuff too .. very cool
Chris Dalby
@moose4621
@denman0000_gitlab Only cool if it works. :-)
den har
@denman0000_gitlab
@moose4621 haha i know it will work :-)
@moose4621 you're on a roll
Chris Dalby
@moose4621
@denman0000_gitlab Ha ha, can't last forever!
den har
@denman0000_gitlab
@moose4621 believe in yourself :-) and it will
den har
@denman0000_gitlab
@moose4621 how did you get alerting to work in broweser ? Just ALERT "whatever " in .js ?
Chris Dalby
@moose4621
@denman0000_gitlab if (heartbeat_interval === null) {
missed_heartbeats = 0;
heartbeat_interval = setInterval(function() {
try {
missed_heartbeats++;
if (missed_heartbeats >= 3){
alert("Signal to seeder lost! Check WIFI connection and reload page to continue");
throw new Error("Too many missed heartbeats.");
}
            connection.send(heartbeat_msg);
        } catch(e) {
            clearInterval(heartbeat_interval);
            heartbeat_interval = null;
            console.warn("Closing connection. Reason: " + e.message);
            connection.close();
        }
    }, 5000);
}
@denman0000_gitlab Thats weird
@denman0000_gitlab This is the important bit. alert("Signal to seeder lost! Check WIFI connection and reload page to continue");
den har
@denman0000_gitlab
@moose4621 aha doing the eagle eye step by step layman coder filter and read now
Chris Dalby
@moose4621
@denman0000_gitlab Off to work I go :-( Have a good evening.
den har
@denman0000_gitlab
@moose4621 Thanks a million for catch up .. have an awesome day @ work andkeep well .. TY for help and will chat later
den har
@denman0000_gitlab
hi all
Develo
@devyte
@denman0000_gitlab hello
den har
@denman0000_gitlab
@devyte Hi How are you ?
@devyte Well thanks and you ?
Anton Kristensen
@antonedvard
im loosing my mind! i am trying to multiply 0.001678466796875 but i only get 0.00 defining the variable as a float
Chris Dalby
@moose4621
@antonedvard @denman0000_gitlab Good morning all.
@antonedvard Try Serial.println(answer,15);
@antonedvard The 15 is the number of decimal places to print.
Develo
@devyte
interesting discussions you're all having here, I'm glad to see ongoing discussions for the ESP
Chris Dalby
@moose4621
@devyte Hi devyte, what's happenin'?
Develo
@devyte
too much, actually :) repo issue cleanup, PR reviews, mdns rewrite, investigation into a batmanadv-like mesh implementation, migration of all .c files to .cpp files, migration to a new gcc, exceptions, stability fixes....
and too little time
oh, and also an experimental integration of w5100/w5500 ethernet shields into lwip as additional interfaces
Chris Dalby
@moose4621
@devyte Ok..... Now I feel inadequate. :-(
Develo
@devyte
:D I feel that way myself about some of what the fellow developers have done. That bearssl alternative to axtls was a huge piece of code, the migration to lwip2 was mindboggling, as is the integration into lwip of the ethernet shields, and don't get me started on the available heap improvements and stack placement voodoo
Ash
@ashthespy
@moose4621 what are you trying to typecast?
Chris Dalby
@moose4621
@ashthespy Same as before. void sendSettings() { uint16_t data[] = {setpointVariable, targetGroundSpeed}; uint8_t payload = (uint8_t *)data; webSocket.broadcastBIN(payload, sizeof(payload)); }
Two int over 8 byte array.
@ashthespy I have it working using my own bastardized method but still want/need to understand typecasting. 'int setpointVariable100 = setpointVariable / 10;
int setpointVariable10 = setpointVariable - (setpointVariable100 10);
int targetGroundSpeed100 = targetGroundSpeed / 10;
int targetGroundSpeed10 = targetGroundSpeed - (targetGroundSpeed100
10);
uint8_t payload[4] = {0, 0, 0, 0};
payload[0] = setpointVariable100;
payload[1] = setpointVariable10;
payload[2] = targetGroundSpeed100;
payload[3] = targetGroundSpeed10;
webSocket.broadcastBIN(payload, sizeof(payload));'
Develo
@devyte
uint8_t payload = (uint8_t )data; => uint8_t payload = (uint8_t *)data;
?
stupid markup
uint8_t payload = (uint8_t *)data;
=>
uint8_t *payload = (uint8_t *)data;
?
Chris Dalby
@moose4621
@devyte Thanks devyte, your answer was the ticket.
@ashthespy Thanks for your time as always. Didn't work though.
Sooo need to understand this stuff.
Ash
@ashthespy
@moose4621 Sorry stepped out -> as @devyte mentioned you need to cast to a pointer