Compare commits
2 Commits
927a2f8d98
...
af4f209026
Author | SHA1 | Date | |
---|---|---|---|
af4f209026 | |||
31350eeed2 |
@ -10688,6 +10688,16 @@
|
||||
)
|
||||
(uuid "21db64db-ae25-4ed4-ba6c-454a1ec3a9d6")
|
||||
)
|
||||
(wire
|
||||
(pts
|
||||
(xy 130.81 78.74) (xy 133.35 78.74)
|
||||
)
|
||||
(stroke
|
||||
(width 0)
|
||||
(type default)
|
||||
)
|
||||
(uuid "21f60869-92ca-48e7-9c92-e32ba51a2992")
|
||||
)
|
||||
(wire
|
||||
(pts
|
||||
(xy 190.5 198.12) (xy 191.77 198.12)
|
||||
@ -23526,6 +23536,28 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(global_label "GND"
|
||||
(shape input)
|
||||
(at 130.81 76.2 0)
|
||||
(fields_autoplaced yes)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(justify left)
|
||||
)
|
||||
(uuid "91f8a2e1-852b-4af4-b258-38b3be725a18")
|
||||
(property "Intersheetrefs" "${INTERSHEET_REFS}"
|
||||
(at 137.0115 76.2 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(justify left)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
)
|
||||
(global_label "GND"
|
||||
(shape input)
|
||||
(at 420.37 135.89 180)
|
||||
@ -25462,6 +25494,28 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(global_label "3_3V"
|
||||
(shape input)
|
||||
(at 133.35 78.74 0)
|
||||
(fields_autoplaced yes)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(justify left)
|
||||
)
|
||||
(uuid "c5e7fa55-b1cf-4e6e-9dba-ee260a46763f")
|
||||
(property "Intersheetrefs" "${INTERSHEET_REFS}"
|
||||
(at 140.1562 78.74 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(justify left)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
)
|
||||
(global_label "PUMP5"
|
||||
(shape input)
|
||||
(at 438.15 396.24 90)
|
||||
@ -41518,6 +41572,79 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(symbol
|
||||
(lib_id "Connector_Generic:Conn_01x03")
|
||||
(at 125.73 78.74 0)
|
||||
(mirror y)
|
||||
(unit 1)
|
||||
(exclude_from_sim no)
|
||||
(in_bom yes)
|
||||
(on_board yes)
|
||||
(dnp yes)
|
||||
(uuid "792b4d0b-465d-434c-a564-9dc697fd29e3")
|
||||
(property "Reference" "J6"
|
||||
(at 129.794 80.01 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(justify left)
|
||||
)
|
||||
)
|
||||
(property "Value" "Conn_01x03_Female"
|
||||
(at 137.922 83.058 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(justify left)
|
||||
)
|
||||
)
|
||||
(property "Footprint" "Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical"
|
||||
(at 125.73 78.74 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(property "Datasheet" "~"
|
||||
(at 125.73 78.74 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(property "Description" "Generic connector, single row, 01x03, script generated (kicad-library-utils/schlib/autogen/connector/)"
|
||||
(at 125.73 78.74 0)
|
||||
(effects
|
||||
(font
|
||||
(size 1.27 1.27)
|
||||
)
|
||||
(hide yes)
|
||||
)
|
||||
)
|
||||
(pin "1"
|
||||
(uuid "80cd0077-0162-4bc0-af2c-81e5887cb171")
|
||||
)
|
||||
(pin "2"
|
||||
(uuid "bce7e03f-b82f-4d41-b1a6-04be8cf3d36e")
|
||||
)
|
||||
(pin "3"
|
||||
(uuid "a9cf13c4-e4a9-4ff4-aa9b-5df34c48ae2d")
|
||||
)
|
||||
(instances
|
||||
(project "PlantCtrlESP32"
|
||||
(path "/c26e8d55-0b6e-4c4e-b7c8-b1fed973201c"
|
||||
(reference "J6")
|
||||
(unit 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(symbol
|
||||
(lib_id "Connector_Generic_MountingPin:Conn_01x02_MountingPin")
|
||||
(at 534.67 71.12 0)
|
||||
|
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@ target = "riscv32imac-esp-espidf"
|
||||
[target.riscv32imac-esp-espidf]
|
||||
linker = "ldproxy"
|
||||
#runner = "espflash flash --monitor --baud 921600 --partition-table partitions.csv -b no-reset" # Select this runner in case of usb ttl
|
||||
runner = "espflash flash --monitor --baud 921600 --partition-table partitions.csv" # Select this runner for espflash v2.x.x
|
||||
runner = "espflash flash --monitor --baud 921600 --flash-size 16mb --partition-table partitions.csv"
|
||||
#runner = "cargo runner"
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
authors = ["Empire Phoenix"]
|
||||
edition = "2021"
|
||||
resolver = "2"
|
||||
rust-version = "1.71"
|
||||
#rust-version = "1.71"
|
||||
|
||||
[profile.dev]
|
||||
# Explicitly disable LTO which the Xtensa codegen backend has issues
|
||||
@ -91,5 +91,6 @@ ds323x = { git = "https://github.com/empirephoenix/ds323x-rs.git" }
|
||||
#bq34z100 = { path = "../../bq34z100_rust" }
|
||||
|
||||
[build-dependencies]
|
||||
cc = "=1.1.30"
|
||||
embuild = "0.32.0"
|
||||
vergen = { version = "8.2.6", features = ["build", "git", "gitcl"] }
|
||||
|
@ -1,6 +1,6 @@
|
||||
nvs, data, nvs, , 16k,
|
||||
otadata, data, ota, , 8k,
|
||||
phy_init, data, phy, , 4k,
|
||||
ota_0, app, ota_0, , 1792K,
|
||||
ota_1, app, ota_1, , 1792K,
|
||||
storage, data, spiffs, , 400K,
|
||||
ota_0, app, ota_0, , 6M,
|
||||
ota_1, app, ota_1, , 6M,
|
||||
storage, data, spiffs, , 3800k,
|
|
@ -38,8 +38,8 @@ pub mod plant_hal;
|
||||
|
||||
const TIME_ZONE: Tz = Berlin;
|
||||
|
||||
const MOIST_SENSOR_MAX_FREQUENCY: u32 = 50000; // 60kHz (500Hz margin)
|
||||
const MOIST_SENSOR_MIN_FREQUENCY: u32 = 500; // 0.5kHz (500Hz margin)
|
||||
const MOIST_SENSOR_MAX_FREQUENCY: u32 = 250000; // 60kHz (500Hz margin)
|
||||
const MOIST_SENSOR_MIN_FREQUENCY: u32 = 10000; // 0.5kHz (500Hz margin)
|
||||
|
||||
const FROM: (f32, f32) = (
|
||||
MOIST_SENSOR_MIN_FREQUENCY as f32,
|
||||
|
@ -1355,12 +1355,6 @@ impl PlantHal {
|
||||
},
|
||||
)?;
|
||||
|
||||
println!("Setup filter");
|
||||
|
||||
//TODO validate filter value! currently max allowed value
|
||||
counter_unit1.set_filter_value(1023)?;
|
||||
counter_unit1.filter_enable()?;
|
||||
|
||||
println!("Wifi start");
|
||||
|
||||
let sys_loop = EspSystemEventLoop::take()?;
|
||||
|
2050
rust/src/webserver/bootstrap-grid.css
vendored
2050
rust/src/webserver/bootstrap-grid.css
vendored
File diff suppressed because it is too large
Load Diff
@ -519,17 +519,6 @@ pub fn httpd(reboot_now: Arc<AtomicBool>) -> Box<EspHttpServer<'static>> {
|
||||
})
|
||||
.unwrap();
|
||||
server
|
||||
.fn_handler("/bootstrap-grid.css", Method::Get, |request| {
|
||||
let headers = [
|
||||
("Access-Control-Allow-Origin", "*"),
|
||||
("Access-Control-Allow-Headers", "*"),
|
||||
("Content-Type", "text/css")
|
||||
];
|
||||
request.into_response(200, None, &headers)?.write(include_bytes!("bootstrap-grid.css"))?;
|
||||
anyhow::Ok(())
|
||||
})
|
||||
.unwrap();
|
||||
server
|
||||
}
|
||||
|
||||
fn cors_response(
|
||||
|
2050
rust/src_webpack/public/bootstrap-grid.css
vendored
2050
rust/src_webpack/public/bootstrap-grid.css
vendored
File diff suppressed because it is too large
Load Diff
@ -1,42 +1,39 @@
|
||||
<div class="row">
|
||||
<div class="col-12" style="text-align: center; font-weight: bold;">
|
||||
<div class="flexcontainer">
|
||||
<div class="subtitle">
|
||||
Battery:
|
||||
</div>
|
||||
<div style="display: block; right: 8px; position: absolute;">
|
||||
<input id="battery_auto_refresh" type="checkbox">⟳
|
||||
</div>
|
||||
|
||||
<input id="battery_auto_refresh" type="checkbox">⟳
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="col-7">V:</span>
|
||||
<div class="col-5" id="battery_voltage_milli_volt" style="text-wrap: nowrap"></div>
|
||||
<div class="flexcontainer">
|
||||
<span class="powerflexkey">V:</span>
|
||||
<span class="powerflexvalue" id="battery_voltage_milli_volt"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-7">mA:</span>
|
||||
<div class="col-5" id="battery_current_milli_ampere" style="text-wrap: nowrap"></div>
|
||||
<div class="flexcontainer">
|
||||
<span class="powerflexkey">mA:</span>
|
||||
<span class="powerflexvalue" id="battery_current_milli_ampere" ></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-7">Cycles:</span>
|
||||
<div class="col-5" id="battery_cycle_count" style="text-wrap: nowrap"></div>
|
||||
<div class="flexcontainer">
|
||||
<span class="powerflexkey">Cycles:</span>
|
||||
<span class="powerflexvalue" id="battery_cycle_count" ></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-7">design mA:</span>
|
||||
<div class="col-5" id="battery_design_milli_ampere" style="text-wrap: nowrap"></div>
|
||||
<div class="flexcontainer">
|
||||
<span class="powerflexkey">design mA:</span>
|
||||
<span class="powerflexvalue" id="battery_design_milli_ampere" ></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-7">remaining mA:</span>
|
||||
<div class="col-5" id="battery_remaining_milli_ampere" style="text-wrap: nowrap"></div>
|
||||
<div class="flexcontainer">
|
||||
<span class="powerflexkey">remaining mA:</span>
|
||||
<span class="powerflexvalue" id="battery_remaining_milli_ampere" ></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-7">charge %:</span>
|
||||
<div class="col-5" id="battery_state_of_charge" style="text-wrap: nowrap"></div>
|
||||
<div class="flexcontainer">
|
||||
<span class="powerflexkey">charge %:</span>
|
||||
<span class="powerflexvalue" id="battery_state_of_charge" ></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-7">health %:</span>
|
||||
<div class="col-5" id="battery_state_of_health" style="text-wrap: nowrap"></div>
|
||||
<div class="flexcontainer">
|
||||
<span class="powerflexkey">health %:</span>
|
||||
<span class="powerflexvalue" id="battery_state_of_health" ></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-7">Temp °C:</span>
|
||||
<div class="col-5" id="battery_temperature" style="text-wrap: nowrap"></div>
|
||||
<div class="flexcontainer">
|
||||
<span class="powerflexkey">Temp °C:</span>
|
||||
<span class="powerflexvalue" id="battery_temperature" ></span>
|
||||
</div>
|
@ -1,4 +1,3 @@
|
||||
<link rel="stylesheet" href="bootstrap-grid.css">
|
||||
<style>
|
||||
.progressPane {
|
||||
display: block;
|
||||
@ -68,31 +67,160 @@
|
||||
transform: translateX(0%) scaleX(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.flexcontainer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.subcontainer {
|
||||
min-width: 300px;
|
||||
flex-grow: 1;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
padding: 8px;
|
||||
}
|
||||
.subcontainercontainer{
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.plantcontainer {
|
||||
flex-grow: 1;
|
||||
min-width: 100%;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
padding: 8px;
|
||||
}
|
||||
@media (min-width: 350px) {
|
||||
.plantcontainer {
|
||||
flex-grow: 1;
|
||||
min-width: 40%;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 900px) {
|
||||
.plantcontainer {
|
||||
flex-grow: 1;
|
||||
min-width: 20%;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1800px) {
|
||||
.plantcontainer {
|
||||
flex-grow: 1;
|
||||
min-width: 200px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.plantlist {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.powerflexkey {
|
||||
min-width: 150px;
|
||||
}
|
||||
.powerflexvalue {
|
||||
text-wrap: nowrap;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.basicnetworkkey{
|
||||
min-width: 200px;
|
||||
}
|
||||
.basicnetworkvalue{
|
||||
flex-grow: 1;
|
||||
}
|
||||
.basicnetworkkeyssid1{
|
||||
flex-grow: 1;
|
||||
}
|
||||
.basicnetworkkeyssid2{
|
||||
min-width: 50px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.mqttkey{
|
||||
min-width: 100px;
|
||||
}
|
||||
.mqttvalue{
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.otakey{
|
||||
min-width: 100px;
|
||||
}
|
||||
.otavalue{
|
||||
flex-grow: 1;
|
||||
}
|
||||
.otaform {
|
||||
min-width: 100px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
.otachooser {
|
||||
min-width: 100px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.lightcheckbox{
|
||||
margin: 0px;
|
||||
min-width: 20px
|
||||
}
|
||||
.lightkey{
|
||||
min-width: 200px;
|
||||
}
|
||||
.lightvalue{
|
||||
flex-grow: 1;
|
||||
}
|
||||
.lightnumberbox{
|
||||
min-width: 75px;
|
||||
}
|
||||
|
||||
.tankcheckbox {
|
||||
min-width: 20px;
|
||||
margin: 0px;
|
||||
}
|
||||
.tankkey{
|
||||
min-width: 250px;
|
||||
}
|
||||
.tankvalue{
|
||||
flex-grow: 1;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container-xl">
|
||||
<div class="row">
|
||||
<div id="firmwareview" class="container col-12 col-lg-4"
|
||||
style="border-width: 1px; border-style: solid; padding: 8px;">
|
||||
<div style="display:flex; flex-wrap: wrap;">
|
||||
<div id="firmwareview" style="border-width: 1px; border-style: solid; flex-grow: 1; min-width: 350px">
|
||||
</div>
|
||||
<div id="timeview" class="container col-12 col-lg-4" style="border-style: solid; border-width: 1px; padding: 8px;">
|
||||
<div id="timeview" style="border-width: 1px; border-style: solid; flex-grow: 1;">
|
||||
</div>
|
||||
<div id="batteryview" class="container col-12 col-lg-4"
|
||||
style="border-style: solid; border-width: 1px; padding: 8px;">
|
||||
<div id="batteryview" style="border-width: 1px; border-style: solid; flex-grow: 1;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div id="network_view" class="container col-12 col-sm-6 col-lg-4"
|
||||
style="border-style: solid; border-width: 1px; padding: 8px;">
|
||||
<div class="flexcontainer">
|
||||
<div id="network_view" class="subcontainercontainer"></div>
|
||||
<div id="lightview" class="subcontainer">
|
||||
</div>
|
||||
<div id="lightview" class="container col-12 col-sm-6 col-lg-4"
|
||||
style="border-style: solid; border-width: 1px; padding: 16px;">
|
||||
</div>
|
||||
<div id="tankview" class="container col-12 col-lg-4" style="border-style: solid; border-width: 1px; padding: 16px;">
|
||||
<div id="tankview" class="subcontainer">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -105,11 +233,7 @@
|
||||
<h2>config</h2>
|
||||
<h3>Plants:</h3>
|
||||
<button id="measure_moisture">Measure Moisture</button>
|
||||
<div id="plants" class="row"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="plants" class="plantlist"></div>
|
||||
|
||||
<button id="submit">Submit</button>
|
||||
<div id="submit_status"></div>
|
||||
|
@ -1,32 +1,52 @@
|
||||
<h2>Basic network</h2>
|
||||
Api Redirection to:
|
||||
<span id="remote_ip">remote ip</span>
|
||||
<br>
|
||||
AccessPoint Mode (or fallback)
|
||||
<br>
|
||||
<label for="ap_ssid">AP SSID:</label>
|
||||
<input type="text" id="ap_ssid" list="ssidlist">
|
||||
<br>
|
||||
<br>
|
||||
Station Mode:
|
||||
<br>
|
||||
<label for="ssid">SSID:</label>
|
||||
<input type="text" id="ssid" list="ssidlist"> <input type="button" id="scan" value="Scan">
|
||||
<datalist id="ssidlist">
|
||||
<option value="Not scanned yet">
|
||||
</datalist>
|
||||
<br>
|
||||
<label for="ssid">Password:</label>
|
||||
<input type="text" id="password">
|
||||
<br>
|
||||
<br>
|
||||
Mqtt Reporting
|
||||
<br>
|
||||
<div>
|
||||
MQTT Url
|
||||
<input type="text" id="mqtt_url" placeholder="mqtt://192.168.1.1:1883">
|
||||
</div>
|
||||
<div>
|
||||
Base Topic
|
||||
<input type="text" id="base_topic" placeholder="plants/one">
|
||||
<div class="flexcontainer">
|
||||
<div class="subcontainer">
|
||||
<div class="subtitle">Basic network</div>
|
||||
<div class="flexcontainer">
|
||||
<span class="basicnetworkkey">Api Redirection to:</span>
|
||||
<span class="basicnetworkvalue" id="remote_ip">remote ip</span>
|
||||
</div>
|
||||
|
||||
<div class="flexcontainer">
|
||||
<label class="basicnetworkkey" for="ap_ssid">AP SSID:</label>
|
||||
<input class="basicnetworkvalue" type="text" id="ap_ssid" list="ssidlist">
|
||||
</div>
|
||||
|
||||
<div class="flexcontainer">
|
||||
<label class="basicnetworkkey" for="ssid">Station Mode:</label>
|
||||
<input class="basicnetworkkeyssid1" type="text" id="ssid" list="ssidlist">
|
||||
<datalist id="ssidlist">
|
||||
<option value="Not scanned yet">
|
||||
</datalist>
|
||||
<input class="basicnetworkkeyssid2" type="button" id="scan" value="Scan">
|
||||
</div>
|
||||
|
||||
<div class="flexcontainer">
|
||||
<label class="basicnetworkkey" for="ssid">Password:</label>
|
||||
<input class="basicnetworkvalue" type="text" id="password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="subcontainer">
|
||||
<div class="flexcontainer">
|
||||
<div class="subtitle">
|
||||
Mqtt Reporting
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flexcontainer">
|
||||
<div class="mqttkey">
|
||||
MQTT Url
|
||||
</div>
|
||||
<input class="mqttvalue" type="text" id="mqtt_url" placeholder="mqtt://192.168.1.1:1883">
|
||||
</div>
|
||||
<div class="flexcontainer">
|
||||
<div class="mqttkey">
|
||||
Base Topic
|
||||
</div>
|
||||
<input class="mqttvalue" type="text" id="base_topic" placeholder="plants/one">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
@ -1,14 +1,19 @@
|
||||
<h3>Light:</h3>
|
||||
<input type="checkbox" id="night_lamp_enabled" checked="false"> Enable Nightlight
|
||||
<div>
|
||||
Start
|
||||
<select type="time" id="night_lamp_time_start">
|
||||
</select>
|
||||
Stop
|
||||
<select type="time" id="night_lamp_time_end">
|
||||
<div class="subtitle">Light:</div>
|
||||
<div class="flexcontainer">
|
||||
<div class="lightkey">Enable Nightlight</div>
|
||||
<input class="lightcheckbox" type="checkbox" id="night_lamp_enabled" checked="false">
|
||||
</div>
|
||||
<div class="flexcontainer">
|
||||
<div class="lightkey">Light only when dark</div>
|
||||
<input class="lightcheckbox" type="checkbox" id="night_lamp_only_when_dark">
|
||||
</div>
|
||||
<div class="flexcontainer">
|
||||
<div class="lightkey">Start</div>
|
||||
<select class="lightnumberbox" type="time" id="night_lamp_time_start">
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<input type="checkbox" id="night_lamp_only_when_dark">
|
||||
Light only when dark
|
||||
<div class="flexcontainer">
|
||||
<div class="lightkey">Stop</div>
|
||||
<select class="lightnumberbox" type="time" id="night_lamp_time_end">
|
||||
</select>
|
||||
</div>
|
@ -1,25 +1,21 @@
|
||||
<div class="row">
|
||||
<div class="col-12" style="text-align: center; font-weight: bold;">
|
||||
<div class="flexcontainer">
|
||||
<div class="subtitle">
|
||||
Current Firmware
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<span>Buildtime:</span>
|
||||
<span id="firmware_buildtime" style="text-wrap: nowrap"></span>
|
||||
</div>
|
||||
<div class="flexcontainer">
|
||||
<span class="otakey">Buildtime:</span>
|
||||
<span class="otavalue" id="firmware_buildtime"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<span>Buildhash:</span>
|
||||
<span id="firmware_githash" style="text-wrap: nowrap"></span>
|
||||
</div>
|
||||
<div class="flexcontainer">
|
||||
<span class="otakey">Buildhash:</span>
|
||||
<span class="otavalue" id="firmware_githash"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<form class="col-12" id="upload_form" method="post">
|
||||
<input type="file" name="file1" id="firmware_file"><br>
|
||||
<div class="flexcontainer">
|
||||
<form class="otaform" id="upload_form" method="post">
|
||||
<input class="otachooser" type="file" name="file1" id="firmware_file"><br>
|
||||
</form>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="display:flex">
|
||||
<input style="margin-left: 16px; margin-top: 8px;" class="col-6" type="button" id="test" value="Self-Test">
|
||||
</div>
|
@ -1,7 +1,10 @@
|
||||
<div class="container" style="border-style: solid; border-width: 1px; padding: 8px;">
|
||||
<span class="row col-12" style="font-weight: bold; display: block; text-align: center;"
|
||||
id="plant_${plantId}_header">Plant ${plantId}</span>
|
||||
|
||||
<div>
|
||||
<div style="font-weight: bold; text-align: center; flex-grow: 1;"
|
||||
id="plant_${plantId}_header">Plant ${plantId}</div>
|
||||
|
||||
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-1"></div>
|
||||
<button class="col-10" id="plant_${plantId}_test">Test</button>
|
||||
@ -53,9 +56,10 @@
|
||||
<input class="col-4" id="plant_${plantId}_sensor_b" type="checkbox">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-7">Max Consecutive Pump Count:</div>
|
||||
<div class="col-7">Warn Pump Count:</div>
|
||||
<input class="col-4" id="plant_${plantId}_max_consecutive_pump_count" type="number" min="1" , max="50" ,
|
||||
placeholder="10">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -67,9 +67,7 @@ export class PlantView {
|
||||
const plantRaw = template.replaceAll("${plantId}", String(plantId));
|
||||
this.plantDiv.innerHTML = plantRaw
|
||||
|
||||
this.plantDiv.classList.add("col-12" )
|
||||
this.plantDiv.classList.add("col-sm-6" )
|
||||
this.plantDiv.classList.add("col-md-auto" )
|
||||
this.plantDiv.classList.add("plantcontainer")
|
||||
parent.appendChild(this.plantDiv)
|
||||
|
||||
this.header = document.getElementById("plant_"+plantId+"_header")!
|
||||
|
@ -1,29 +1,29 @@
|
||||
<div class="row">
|
||||
<div class="col-12" style="font-weight: bold; text-align: center;">Tank:</div>
|
||||
<div class="flexcontainer">
|
||||
<div class="subtitle">Tank:</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input class="col-4" type="checkbox" id="tank_sensor_enabled">
|
||||
<div class="col-7">Enable Tank Sensor</div>
|
||||
<div class="flexcontainer">
|
||||
<span class="tankkey">Enable Tank Sensor</span>
|
||||
<input class="tankcheckbox" type="checkbox" id="tank_sensor_enabled">
|
||||
</div>
|
||||
<div class="row">
|
||||
<input class="col-4" type="checkbox" id="tank_allow_pumping_if_sensor_error">
|
||||
<div class="col-7">Ignore Sensor Error</div>
|
||||
<div class="flexcontainer">
|
||||
<div class="tankkey">Ignore Sensor Error</div>
|
||||
<input class="tankcheckbox" type="checkbox" id="tank_allow_pumping_if_sensor_error">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<input class="col-4" type="number" min="2" max="500000" id="tank_useable_ml">
|
||||
<div class="col-7">Tank Size mL</div>
|
||||
<div class="flexcontainer">
|
||||
<div class="tankkey">Useable ml full% to empty%</div>
|
||||
<input class="tankvalue" type="number" min="2" max="500000" id="tank_useable_ml">
|
||||
</div>
|
||||
<div class="row">
|
||||
<input class="col-4" type="number" min="1" max="500000" id="tank_warn_percent">
|
||||
<div class="col-7">Tank Warn Percent (mapped in relation to empty and full)</div>
|
||||
<div class="flexcontainer">
|
||||
<div class="tankkey">Warn below %</div>
|
||||
<input class="tankvalue" type="number" min="1" max="500000" id="tank_warn_percent">
|
||||
</div>
|
||||
<div class="row">
|
||||
<input class="col-4" type="number" min="0" max="100" id="tank_empty_percent">
|
||||
<div class="col-7">Tank Empty Percent (% max move)</div>
|
||||
<div class="flexcontainer">
|
||||
<div class="tankkey">Empty at %</div>
|
||||
<input class="tankvalue" type="number" min="0" max="100" id="tank_empty_percent">
|
||||
</div>
|
||||
<div class="row">
|
||||
<input class="col-4" type="number" min="0" max="100" id="tank_full_percent">
|
||||
<div class="col-7">Tank Full Percent (% max move)</div>
|
||||
<div class="flexcontainer">
|
||||
<div class="tankkey">Full at %</div>
|
||||
<input class="tankvalue" type="number" min="0" max="100" id="tank_full_percent">
|
||||
</div>
|
@ -1,24 +1,21 @@
|
||||
<div class="row">
|
||||
<div class="col-12" style="text-align: center; font-weight: bold;">
|
||||
<div style="display:flex">
|
||||
<span style="flex-grow: 1; text-align: center; font-weight: bold;">
|
||||
Time:
|
||||
</div>
|
||||
<div style="display: block; right: 8px; position: absolute;">
|
||||
<input id="timeview_auto_refresh" type="checkbox">⟳
|
||||
</div>
|
||||
|
||||
</span>
|
||||
<input id="timeview_auto_refresh" type="checkbox">⟳
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<span class="col-2">MCU:</span>
|
||||
<div class="col-9" id="timeview_esp_time" style="text-wrap: nowrap">Esp time</div>
|
||||
<div style="display:flex">
|
||||
<span style="min-width: 50px;">MCU:</span>
|
||||
<div id="timeview_esp_time" style="text-wrap: nowrap; flex-grow: 1;">Esp time</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-2">RTC:</span>
|
||||
<div class="col-9" id="timeview_rtc_time" style="text-wrap: nowrap">Rtc time</div>
|
||||
<div style="display:flex">
|
||||
<span style="min-width: 50px;">RTC:</span>
|
||||
<div id="timeview_rtc_time" style="text-wrap: nowrap; flex-grow: 1;">Rtc time</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span class="col-2">Local:</span>
|
||||
<div class="col-9" id="timeview_browser_time" style="text-wrap: nowrap">Local time</div>
|
||||
<div style="display:flex">
|
||||
<span style="min-width: 50px;">Local:</span>
|
||||
<div id="timeview_browser_time" style="text-wrap: nowrap; flex-grow: 1;">Local time</div>
|
||||
</div>
|
||||
|
||||
<button id="timeview_time_upload">Store Browser time into esp and rtc</button>
|
||||
|
@ -8,7 +8,7 @@ const isDevServer = process.env.WEBPACK_SERVE;
|
||||
console.log("Dev server is " + isDevServer);
|
||||
var host;
|
||||
if (isDevServer){
|
||||
host = 'http://192.168.0.105';
|
||||
host = 'http://10.23.43.24';
|
||||
} else {
|
||||
host = '';
|
||||
}
|
||||
@ -29,14 +29,6 @@ module.exports = {
|
||||
title: "PlantCtrl",
|
||||
}),
|
||||
new HtmlWebpackHarddiskPlugin(),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: "public/bootstrap-grid.css",
|
||||
to: "bootstrap-grid.css",
|
||||
}
|
||||
],
|
||||
}),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user