NittyGritty icon

Untitled

NittyGritty | PRO | 06/04/23 08:29:13 PM UTC | 0 ⭐ | 335 👁️ | Never ⏰ | []
text |

1.67 KB

|

None

|

0 👍

/

0 👎

in Datei LittleFS.ino (am Ende eingefügt)
 bool freeSpace(uint16_t const& printsize) {                // Funktion um beim speichern in Logdateien zu prüfen ob noch genügend freier Platz verfügbar ist.
  FSInfo fs_info;   LittleFS.info(fs_info);                  // Füllt FSInfo Struktur mit Informationen über das Dateisystem
  //Serial.printf("Funktion: %s meldet in Zeile: %d FreeSpace: %s\n", __PRETTY_FUNCTION__, __LINE__, formatBytes(fs_info.totalBytes - (fs_info.usedBytes * 1.05)).c_str());
  return (fs_info.totalBytes - (fs_info.usedBytes * 1.05) > printsize) ? true : false;
}
 in Wochenzeitschaltuhr8266.ino (vor setup() eingefügt)
constexpr uint8_t devicePin[] = {D5, D6};  // Pin für Relais einstellen
constexpr auto count = 10;                 // Anzahl Schaltzeiten (analog Html Dokument) einstellen 2 bis 16
constexpr auto aktiv = LOW;               // LOW für LOW aktive Relais oder HIGH für HIGH aktive (zB. SSR, Mosfet) einstellen
bool deviceState[] {!aktiv, !aktiv};
 struct Collection {
  byte switchActive[count];
  byte wday[count];
  char switchTime[count * 2][6];
};
 Collection times;
 String sketchName() {           // Dateiname für den Admin Tab ab EspCoreVersion 2.6.0
  char file[sizeof(__FILE__)] = __FILE__;
  char * pos = strrchr(file, '.'); *pos = '\0';
  return file;
}
 in Zeitlogger.ino in Funktion timeDataLogger geändert
 void timeDataLogger(const uint8_t num, const String customer) {              // Relais Nummer und Ereignisauslöser
  static bool lastrelState[] {!aktiv, !aktiv};
  static bool relState[] {!aktiv, !aktiv}; // zugefügt
 in Zeitschaltuhr.ino die Pin-Werte "active" gegen "aktiv" getauscht
     

Comments