add FSM3.0 src code not impl yet, add header guards and format main
This commit is contained in:
parent
f57e875a17
commit
5986beb10c
@ -27,7 +27,7 @@
|
||||
|
||||
<div class="param_block">
|
||||
Time per stair: <output id="out_tim_sta" class="val_range">50</output> %
|
||||
|
||||
|
||||
<div class="slider">
|
||||
<input type="range" class="regler" id="range_tim_sta" min="0" max="100" value="50">
|
||||
</div>
|
||||
@ -38,20 +38,20 @@
|
||||
<div class="slider">
|
||||
<input type="range" class="regler" id="range_tim_on" min="0" max="100" value="50">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="terminal">
|
||||
<input type="button" id="clear_term" value="clear" onclick="clearTerminal();">
|
||||
<input type="checkbox" id="scroll" name="scroll" value="scroll" checked>
|
||||
<label for="scroll"> autoscroll </label>
|
||||
<textarea id="term">waiting for log messages ... </textarea>
|
||||
<div class="terminal">
|
||||
<input type="button" id="clear_term" value="clear" onclick="clearTerminal();">
|
||||
<input type="checkbox" id="scroll" name="scroll" value="scroll" checked>
|
||||
<label for="scroll"> autoscroll </label>
|
||||
<textarea id="term">waiting for log messages ... </textarea>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
<script src="/input.js"></script>
|
||||
<script src="/input.js"></script>
|
||||
|
||||
</html>
|
@ -1,7 +1,7 @@
|
||||
#ifndef __HTTPSERVER_H
|
||||
#define __HTTPSERVER_H
|
||||
// Wrapper for ESP8266WebServer with Filesystem as HTTP source
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <stdarg.h>
|
||||
#include "filesys.h"
|
||||
@ -42,3 +42,5 @@ public:
|
||||
void logf(const char *format, ...);
|
||||
void logt(const char *format, ...);
|
||||
};
|
||||
|
||||
#endif // __HTTPSERVER_H
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef __TREPPE_H
|
||||
#define __TREPPE_H
|
||||
|
||||
#include "FSMTreppe2/FSMTreppe2.h"
|
||||
#include "PCA9685.h"
|
||||
@ -87,4 +88,6 @@ public:
|
||||
void activate_idle_pwm(bool active);
|
||||
void set_active_pwm(uint16_t _active_pwm);
|
||||
void set_time_per_stair(uint16_t _time_per_stair);
|
||||
};
|
||||
};
|
||||
|
||||
#endif // __TREPPE_H
|
@ -13,5 +13,5 @@ mem 0x60000000 0x60001fff rw
|
||||
set serial baud 460800
|
||||
|
||||
file .pio/build/debug/firmware.elf
|
||||
target remote /dev/ttyUSB0
|
||||
target remote \\.\COM23
|
||||
thb loop
|
||||
|
17
src/main.cpp
17
src/main.cpp
@ -15,7 +15,7 @@ extern "C" {
|
||||
|
||||
// BOARD
|
||||
#define ESP12_LED 2
|
||||
#define NODEMCU_LED 16
|
||||
// #define NODEMCU_LED 16
|
||||
|
||||
// PWM
|
||||
#include "treppe.h"
|
||||
@ -54,14 +54,15 @@ void setup() {
|
||||
#else
|
||||
Serial.begin(76800);
|
||||
#endif
|
||||
|
||||
Serial.println(F("Booting ...."));
|
||||
|
||||
//pinMode(NODEMCU_LED, OUTPUT);
|
||||
Serial.println("Booting ....");
|
||||
pinMode(ESP12_LED, OUTPUT);
|
||||
|
||||
Wire.begin(); // Wire must be started first
|
||||
Wire.setClock(1000000); // Supported baud rates are 100kHz, 400kHz, and 1000kHz
|
||||
stairs.setup();
|
||||
Serial.println("PCA9685 connected !");
|
||||
//attachInterrupt(digitalPinToInterrupt(2), int_test, RISING);
|
||||
//attachInterrupt(digitalPinToInterrupt(12), int_test, RISING);
|
||||
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin(ssid, password);
|
||||
@ -82,14 +83,8 @@ void setup() {
|
||||
|
||||
httpServer.start();
|
||||
httpServer.start_apps();
|
||||
|
||||
Serial.println("HTTP server started !");
|
||||
|
||||
stairs.setup();
|
||||
Serial.println("PCA9685 connected !");
|
||||
//attachInterrupt(digitalPinToInterrupt(2), int_test, RISING);
|
||||
//attachInterrupt(digitalPinToInterrupt(12), int_test, RISING);
|
||||
|
||||
os_timer_setfn(&timer1, timerCallback, &timer_flag);
|
||||
os_timer_arm(&timer1, 20, true);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user