Skip to content

Commit

Permalink
Image and script restore stations
Browse files Browse the repository at this point in the history
  • Loading branch information
karawin committed Feb 20, 2021
1 parent f03d246 commit 28ee1bc
Show file tree
Hide file tree
Showing 9 changed files with 339 additions and 329 deletions.
Binary file added images/karadio0221.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion main/webclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,7 @@ void clientTask(void *pvParams) {
else
send(sockfd, (char*)bufrec, strlen((char*)bufrec), 0);

ESP_LOGD(TAG,"\nSent: %s\n",bufrec);
if (setsockopt (sockfd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)) < 0)
ESP_LOGE(TAG,"Socket: %d setsockopt: %d errno:%d ",sockfd, bytes_read,errno);
//////
Expand Down Expand Up @@ -1453,7 +1454,7 @@ void clientTask(void *pvParams) {
if (errno == 11) bytes_read = 0;
}
}
//if (bytes_read < 1000 )
//if (bytes_read < 100 ) ESP_LOGD(TAG,"\nReceived: %s\n",bufrec);
// printf("Rec:%d\n%s\n",bytes_read,bufrec);
// printf(" %d ",bytes_read); fflush(stdout);
if ( bytes_read > 0 )
Expand Down
2 changes: 1 addition & 1 deletion webpage/favicon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const char favicon_png[] = {
0x1f, 0x8b, 0x08, 0x08, 0xba, 0x44, 0x2d, 0x60, 0x00, 0x03, 0x66, 0x61,
0x1f, 0x8b, 0x08, 0x08, 0x1e, 0x35, 0x31, 0x60, 0x00, 0x03, 0x66, 0x61,
0x76, 0x69, 0x63, 0x6f, 0x6e, 0x2e, 0x70, 0x6e, 0x67, 0x00, 0x01, 0xd0,
0x02, 0x2f, 0xfd, 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00,
0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00,
Expand Down
2 changes: 1 addition & 1 deletion webpage/index
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const char index_html[] = {
0x1f, 0x8b, 0x08, 0x08, 0xd0, 0x45, 0x2d, 0x60, 0x00, 0x03, 0x69, 0x6e,
0x1f, 0x8b, 0x08, 0x08, 0x87, 0x37, 0x31, 0x60, 0x00, 0x03, 0x69, 0x6e,
0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x00, 0xed, 0x3c, 0xf9,
0x93, 0xa2, 0x3a, 0xb7, 0xff, 0x0a, 0x9f, 0x55, 0xf7, 0xde, 0xf9, 0xca,
0xe9, 0x06, 0x71, 0xef, 0x99, 0xb6, 0x0a, 0x15, 0x04, 0x15, 0x17, 0x70,
Expand Down
2 changes: 1 addition & 1 deletion webpage/logo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const char logo_png[] = {
0x1f, 0x8b, 0x08, 0x08, 0xb8, 0x44, 0x2d, 0x60, 0x00, 0x03, 0x6c, 0x6f,
0x1f, 0x8b, 0x08, 0x08, 0x1d, 0x35, 0x31, 0x60, 0x00, 0x03, 0x6c, 0x6f,
0x67, 0x6f, 0x2e, 0x70, 0x6e, 0x67, 0x00, 0x01, 0x61, 0x0c, 0x9e, 0xf3,
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x33,
Expand Down
640 changes: 322 additions & 318 deletions webpage/script

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions webpage/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1108,20 +1108,25 @@ function downloadStations()
xhr.send(tosend);
} catch (e){console.log("error "+e+" "+tosend);}
// }
indmax = 2;
indmax = 4;
for(line = 3; line < lines.length; line+=indmax){
// console.log(lines[line]);
try {
tosend = "nb=" + indmax;
for (i = 0 ; i< indmax;i++)
for (i = 0 ; (i< indmax)&&((line+i) <maxStation);i++)
{
if (lines[line+i] != "")
arr = JSON.parse(lines[line+i]);
fillInfo(line+i,arr);
}
xhr.open("POST","setStation",false);
xhr.setRequestHeader(content,ctype);
xhr.send(tosend);
if (i>0)
{
xhr.open("POST","setStation",false);
xhr.setRequestHeader(content,ctype);
xhr.send(tosend);
}
} catch (e){console.log("error "+e+" "+tosend);}

}
loadStationsList(maxStation);

Expand Down
2 changes: 1 addition & 1 deletion webpage/style
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const char style_css[] = {
0x1f, 0x8b, 0x08, 0x08, 0xc8, 0x45, 0x2d, 0x60, 0x00, 0x03, 0x73, 0x74,
0x1f, 0x8b, 0x08, 0x08, 0x81, 0x37, 0x31, 0x60, 0x00, 0x03, 0x73, 0x74,
0x79, 0x6c, 0x65, 0x2e, 0x6d, 0x69, 0x6e, 0x2e, 0x63, 0x73, 0x73, 0x00,
0xed, 0x5a, 0x6d, 0x6f, 0xdb, 0x36, 0x10, 0xfe, 0x2b, 0x5c, 0x8c, 0x00,
0x35, 0x66, 0xb9, 0x94, 0x6c, 0x27, 0xb2, 0x84, 0x02, 0x2d, 0xb6, 0x6c,
Expand Down
2 changes: 1 addition & 1 deletion webpage/style1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const char style1_css[] = {
0x1f, 0x8b, 0x08, 0x08, 0xcb, 0x45, 0x2d, 0x60, 0x00, 0x03, 0x73, 0x74,
0x1f, 0x8b, 0x08, 0x08, 0x84, 0x37, 0x31, 0x60, 0x00, 0x03, 0x73, 0x74,
0x79, 0x6c, 0x65, 0x31, 0x2e, 0x6d, 0x69, 0x6e, 0x2e, 0x63, 0x73, 0x73,
0x00, 0xed, 0x5a, 0xeb, 0x6f, 0xdb, 0x36, 0x10, 0xff, 0x57, 0xb4, 0x18,
0x01, 0x12, 0xcc, 0x72, 0x29, 0x59, 0x76, 0x64, 0x09, 0x05, 0xea, 0x76,
Expand Down

0 comments on commit 28ee1bc

Please sign in to comment.