partition table and css

This commit is contained in:
Empire 2025-01-18 01:33:47 +01:00
parent 31350eeed2
commit af4f209026
7 changed files with 99 additions and 50 deletions

View File

@ -5,7 +5,7 @@ target = "riscv32imac-esp-espidf"
[target.riscv32imac-esp-espidf] [target.riscv32imac-esp-espidf]
linker = "ldproxy" 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 -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" #runner = "cargo runner"

View File

@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Empire Phoenix"] authors = ["Empire Phoenix"]
edition = "2021" edition = "2021"
resolver = "2" resolver = "2"
rust-version = "1.71" #rust-version = "1.71"
[profile.dev] [profile.dev]
# Explicitly disable LTO which the Xtensa codegen backend has issues # 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" } #bq34z100 = { path = "../../bq34z100_rust" }
[build-dependencies] [build-dependencies]
cc = "=1.1.30"
embuild = "0.32.0" embuild = "0.32.0"
vergen = { version = "8.2.6", features = ["build", "git", "gitcl"] } vergen = { version = "8.2.6", features = ["build", "git", "gitcl"] }

View File

@ -1,6 +1,6 @@
nvs, data, nvs, , 16k, nvs, data, nvs, , 16k,
otadata, data, ota, , 8k, otadata, data, ota, , 8k,
phy_init, data, phy, , 4k, phy_init, data, phy, , 4k,
ota_0, app, ota_0, , 1792K, ota_0, app, ota_0, , 6M,
ota_1, app, ota_1, , 1792K, ota_1, app, ota_1, , 6M,
storage, data, spiffs, , 400K, storage, data, spiffs, , 3800k,
1 nvs data nvs 16k
2 otadata data ota 8k
3 phy_init data phy 4k
4 ota_0 app ota_0 1792K 6M
5 ota_1 app ota_1 1792K 6M
6 storage data spiffs 400K 3800k

View File

@ -85,11 +85,47 @@
} }
.plantcontainer { .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; min-width: 200px;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
padding: 8px; padding: 8px;
} }
}
.plantlist {
display: flex;
flex-wrap: wrap;
}
.subtitle { .subtitle {
flex-grow: 1; flex-grow: 1;
text-align: center; text-align: center;
@ -140,18 +176,32 @@
width: 100%; width: 100%;
} }
.lightpre{ .lightcheckbox{
margin: 0px;
min-width: 20px min-width: 20px
} }
.lightkeypre{
min-width: 100px;
}
.lightkey{ .lightkey{
min-width: 120px; min-width: 200px;
} }
.lightpost{ .lightvalue{
flex-grow: 1; flex-grow: 1;
} }
.lightnumberbox{
min-width: 75px;
}
.tankcheckbox {
min-width: 20px;
margin: 0px;
}
.tankkey{
min-width: 250px;
}
.tankvalue{
flex-grow: 1;
margin: 0px;
}
</style> </style>
@ -183,11 +233,7 @@
<h2>config</h2> <h2>config</h2>
<h3>Plants:</h3> <h3>Plants:</h3>
<button id="measure_moisture">Measure Moisture</button> <button id="measure_moisture">Measure Moisture</button>
<div id="plants" style="display: flex; flex-wrap: 1;"></div> <div id="plants" class="plantlist"></div>
<button id="submit">Submit</button> <button id="submit">Submit</button>
<div id="submit_status"></div> <div id="submit_status"></div>

View File

@ -1,17 +1,19 @@
<div class="subtitle">Light:</div> <div class="subtitle">Light:</div>
<div class="flexcontainer"> <div class="flexcontainer">
<input class="lightpre" type="checkbox" id="night_lamp_enabled" checked="false"> <div class="lightkey">Enable Nightlight</div>
<div class="lightkeypre">Enable Nightlight</div> <input class="lightcheckbox" type="checkbox" id="night_lamp_enabled" checked="false">
</div> </div>
<div class="flexcontainer"> <div class="flexcontainer">
<div>Start</div> <div class="lightkey">Light only when dark</div>
<select type="time" id="night_lamp_time_start"> <input class="lightcheckbox" type="checkbox" id="night_lamp_only_when_dark">
</select> </div>
<div>Stop</div> <div class="flexcontainer">
<select type="time" id="night_lamp_time_end"> <div class="lightkey">Start</div>
<select class="lightnumberbox" type="time" id="night_lamp_time_start">
</select> </select>
</div> </div>
<div class="flexcontainer"> <div class="flexcontainer">
<input class="" type="checkbox" id="night_lamp_only_when_dark"> <div class="lightkey">Stop</div>
Light only when dark <select class="lightnumberbox" type="time" id="night_lamp_time_end">
</select>
</div> </div>

View File

@ -56,7 +56,7 @@
<input class="col-4" id="plant_${plantId}_sensor_b" type="checkbox"> <input class="col-4" id="plant_${plantId}_sensor_b" type="checkbox">
</div> </div>
<div class="row"> <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" , <input class="col-4" id="plant_${plantId}_max_consecutive_pump_count" type="number" min="1" , max="50" ,
placeholder="10"> placeholder="10">
</div> </div>

View File

@ -1,29 +1,29 @@
<div class="row"> <div class="flexcontainer">
<div class="col-12" style="font-weight: bold; text-align: center;">Tank:</div> <div class="subtitle">Tank:</div>
</div> </div>
<div class="row"> <div class="flexcontainer">
<input class="col-4" type="checkbox" id="tank_sensor_enabled"> <span class="tankkey">Enable Tank Sensor</span>
<div class="col-7">Enable Tank Sensor</div> <input class="tankcheckbox" type="checkbox" id="tank_sensor_enabled">
</div> </div>
<div class="row"> <div class="flexcontainer">
<input class="col-4" type="checkbox" id="tank_allow_pumping_if_sensor_error"> <div class="tankkey">Ignore Sensor Error</div>
<div class="col-7">Ignore Sensor Error</div> <input class="tankcheckbox" type="checkbox" id="tank_allow_pumping_if_sensor_error">
</div> </div>
<div class="row"> <div class="flexcontainer">
<input class="col-4" type="number" min="2" max="500000" id="tank_useable_ml"> <div class="tankkey">Useable ml full% to empty%</div>
<div class="col-7">Tank Size mL</div> <input class="tankvalue" type="number" min="2" max="500000" id="tank_useable_ml">
</div> </div>
<div class="row"> <div class="flexcontainer">
<input class="col-4" type="number" min="1" max="500000" id="tank_warn_percent"> <div class="tankkey">Warn below %</div>
<div class="col-7">Tank Warn Percent (mapped in relation to empty and full)</div> <input class="tankvalue" type="number" min="1" max="500000" id="tank_warn_percent">
</div> </div>
<div class="row"> <div class="flexcontainer">
<input class="col-4" type="number" min="0" max="100" id="tank_empty_percent"> <div class="tankkey">Empty at %</div>
<div class="col-7">Tank Empty Percent (% max move)</div> <input class="tankvalue" type="number" min="0" max="100" id="tank_empty_percent">
</div> </div>
<div class="row"> <div class="flexcontainer">
<input class="col-4" type="number" min="0" max="100" id="tank_full_percent"> <div class="tankkey">Full at %</div>
<div class="col-7">Tank Full Percent (% max move)</div> <input class="tankvalue" type="number" min="0" max="100" id="tank_full_percent">
</div> </div>