Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/fredlcore/BSB_LAN
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Mar 27, 2024
2 parents 90ffd5b + 1f89830 commit 31624dc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
11 changes: 5 additions & 6 deletions BSB_LAN/BSB_LAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4894,7 +4894,6 @@ void loop() {
if (!strcmp_P(cLineBuffer, PSTR("/favicon.svg"))) {
printHTTPheader(HTTP_OK, MIME_TYPE_IMAGE_SVG, HTTP_DO_NOT_ADD_CHARSET_TO_HEADER, HTTP_FILE_NOT_GZIPPED, HTTP_NO_DOWNLOAD, HTTP_AUTO_CACHE_AGE);
printToWebClient(PSTR("\r\n"));
printPStr(svg_favicon_header, sizeof(svg_favicon_header));
printPStr(svg_favicon, sizeof(svg_favicon));
flushToWebClient();
break;
Expand Down Expand Up @@ -6866,7 +6865,7 @@ next_parameter:
lastAvgTime = millis() / 60000;

// write averages to SD card to protect from power off
if ((LoggingMode && CF_LOGMODE_SD_CARD) && avg_parameters[0].number > 0) { //write averages if at least one value is set
if ((LoggingMode & CF_LOGMODE_SD_CARD) && avg_parameters[0].number > 0) { //write averages if at least one value is set
File avgfile = SDCard.open(averagesFileName, FILE_WRITE);
if (avgfile) {
avgfile.seek(0);
Expand Down Expand Up @@ -7643,7 +7642,7 @@ void setup() {
pps_values[PPS_RTI] = 0;
}

if (LoggingMode && CF_LOGMODE_SD_CARD) {
if (LoggingMode & CF_LOGMODE_SD_CARD) {
startLoggingDevice();
} else {
#ifndef ESP32
Expand Down Expand Up @@ -7786,7 +7785,7 @@ void setup() {
if (save_debug_mode == 2) telnetServer = new ComServer(23);

#ifndef ESP32
if (!(LoggingMode && CF_LOGMODE_SD_CARD)) {
if (!(LoggingMode & CF_LOGMODE_SD_CARD)) {
digitalWrite(10,HIGH);
}
#endif
Expand Down Expand Up @@ -7819,7 +7818,7 @@ void setup() {
}
}

if (LoggingMode && CF_LOGMODE_SD_CARD) {
if (LoggingMode & CF_LOGMODE_SD_CARD) {
printToDebug(PSTR("Calculating free space on SDCard..."));
uint32_t m = millis();
#if !defined(ESP32)
Expand Down Expand Up @@ -7910,7 +7909,7 @@ void setup() {
#endif

// restore average
if (LoggingMode && CF_LOGMODE_24AVG && CF_LOGMODE_SD_CARD) {
if (LoggingMode & CF_LOGMODE_24AVG || LoggingMode & CF_LOGMODE_SD_CARD) {
if (SDCard.exists(averagesFileName)) {
File avgfile = SDCard.open(averagesFileName, FILE_READ);
if (avgfile) {
Expand Down
30 changes: 14 additions & 16 deletions BSB_LAN/html_strings.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
#define NEWLINE "" // set to "\n" to aid javascript debugging, set to "" to save space in transfer to client

const char svg_favicon_header[] PROGMEM_LATE =
"<?xml version=\"1.0\" standalone=\"no\"?>"
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 20010904//EN\""
" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">";
const char svg_favicon[] PROGMEM_LATE =
"<svg class='logo' width='400pt' height='400pt' version='1.0' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'>"
"<g transform='translate(0 400) scale(.1 -.1)'>"
"<path id='B' d='m292 3510c-61-38-62-42-62-537 0-501 0-500 70-536 32-16 69-17 445-15 399 3 411 4 451 25 102 54 151 156 141 293-6 92-35 164-95 238-37 46-41 55-31 74 23 43 39 124 39 203 0 97-27 165-86 213-70 58-100 62-488 62-334 0-353-1-384-20zm708-275c0-60-21-98-64-119-28-13-70-16-235-16h-201v-125-125h246c203 0 252-3 279-16 40-19 65-66 65-123v-41h-305-305v305 305h260 260v-45z'/>"
"<path d='m1705 3516c-99-31-171-91-210-172-73-155-17-359 122-441 77-45 136-53 406-53h248l24-25c35-34 35-96 0-130l-24-25h-401-400v-126-125l418 3c407 3 418 4 473 26 77 31 142 90 176 160 24 50 27 69 28 152 0 84-3 102-28 152-33 67-90 121-166 157-55 26-59 26-338 31-325 6-318 4-318 91 0 41 4 54 24 70 22 18 44 19 377 19h354v125 125l-362-1c-264 0-374-4-403-13z'/>"
"<use href='#B' x='2500'/>"
"<path d='m1932 2152c-138-127-300-298-376-400-82-108-178-298-211-416-21-73-25-110-25-215 0-201 50-337 170-465 59-63 198-172 207-162 2 2-7 28-20 59-34 75-47 143-47 242v85h300 300v-82c0-99-21-206-53-270l-24-47 49 26c105 57 218 175 275 287 86 171 84 414-7 585-47 88-132 195-255 321-62 63-122 133-133 155-47 94-70 236-54 333 5 28 7 52 5 52s-47-40-101-88zm45-772c46-34 139-152 172-217l21-43h-240-240l11 27c30 80 185 263 223 263 7 0 31-14 53-30z'/>"
"<path d='m2735 1598c-55-43-55-44-55-593v-505h125 125v348 347l123-125c67-69 219-226 337-349l215-223 51-5c48-5 54-3 90 30l39 35 6 1052h-126-125l-2-345-3-345-237 247c-130 137-281 294-335 351l-99 102h-51c-36 0-58-6-78-22z'/>"
"<path d='m212 1098c3-459 5-515 20-536 41-59 22-57 531-60l467-3v126 125h-385-385v430 430h-125-126l3-512z'/>"
"</g>"
"</svg>";

// The following strings contain html/css/javascript code that has been manually indented; don't let automatic indent break this!
// *INDENT-OFF*

const char svg_favicon[] PROGMEM_LATE =
"<svg class='logo' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'>"
"<path id='b' d='m98 47-63 1c-6 0-12 4-11 11v88c1 5 3 10 10 11l79-1c25-1"
" 24-53 4-61 11-5 18-49-19-49zM48 72h52c1 10-2 18-11 19l-38 1v22l43-1c14"
" 0 14 11 14 20H48Z'/>"
"<use href='#b' x='246'/>"
"<path d='m268 350 1-100c2-14 14-16 29-1l56 59v-69h25l-1 99c1 12-12 17-22"
" 7l-63-64v69Zm-65-173c-112 90-67 155-34 173-4-11-7-23-6-38h60c0 29-4 31-8"
" 40 57-35 42-86 15-112-21-21-32-40-27-63zm-10 81c13 10 18 20 24 30h-48c5-9"
" 8-18 24-30zM21 239h25v86h77v25l-90-1s-11 1-11-12z M246 47v25h-68c-10"
" 1-11 18 1 18l47 1c41 3 37 63 2 66l-82 1v-25h77c11 0 12-18"
" 0-18h-48c-42-5-37-67 0-67z'/>"
"</svg>";

const char favicon[] PROGMEM_LATE = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1F, 0xF3, 0xFF,
Expand Down

0 comments on commit 31624dc

Please sign in to comment.