littefs working
This commit is contained in:
1 parent
baecaf02da
commit
b696703d45
4 files changed
+232
-8
No files matched your search
+10
-8
@@ -19,6 +19,7 @@ extern "C" {
|
||||
#include <WiFiUdp.h>
|
||||
#include <ArduinoOTA.h>
|
||||
|
||||
#include "filesys.h"
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <WiFiClient.h>
|
||||
|
||||
@@ -83,7 +84,6 @@ void handleNotFound() {
|
||||
|
||||
|
||||
void setup_webserver() {
|
||||
|
||||
server.on("/", handleRootGz);
|
||||
server.on("/style.css", handleCssGz);
|
||||
server.on("/favicon.png", handleFaviconGz);
|
||||
@@ -171,6 +171,11 @@ void setup() {
|
||||
|
||||
Serial.println(F("Booting ...."));
|
||||
|
||||
mount_fs();
|
||||
//format_fs();
|
||||
listDir("");
|
||||
readFile("/test.txt");
|
||||
|
||||
pinMode(NODEMCU_LED, OUTPUT);
|
||||
pinMode(ESP12_LED, OUTPUT);
|
||||
|
||||
@@ -214,10 +219,6 @@ void setup() {
|
||||
setup_pwm_pca9685();
|
||||
}
|
||||
|
||||
uint32_t t;
|
||||
#define SP_US(_str,_a) Serial.print(_str); Serial.print(" took: "); Serial.print(_a); Serial.println("µs")
|
||||
#define TIMEIF_US(_str,_f, _l) t=micros(); _f; t=micros()-t; if(t > _l) { SP_US(_str, t); }
|
||||
|
||||
uint8_t softstart_led(uint8_t led, uint16_t startval, uint16_t stopval, uint8_t factor){
|
||||
static uint8_t lastled = 255;
|
||||
static uint8_t current_pwm = 0;
|
||||
@@ -300,11 +301,11 @@ void ledsequence(uint8_t direction, uint8_t onoff, uint8_t factor){
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t t;
|
||||
#define SP_US(_str,_a) Serial.print(_str); Serial.print(" took: "); Serial.print(_a); Serial.println("us")
|
||||
#define TIMEIF_US(_str,_f, _l) t=micros(); _f; t=micros()-t; if(t > _l) { SP_US(_str, t); }
|
||||
|
||||
void loop() {
|
||||
|
||||
|
||||
|
||||
if(millis() - dimmtimer > 2){
|
||||
//ledsequence(direction, onoff, 4);
|
||||
dimmtimer = millis();
|
||||
@@ -316,4 +317,5 @@ void loop() {
|
||||
}
|
||||
TIMEIF_US("OTA", ArduinoOTA.handle(), 1000);
|
||||
TIMEIF_US("HTTP", server.handleClient(), 1000);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user