Mainmenu #28

Merged
rhetenor merged 19 commits from mainmenu into main 2026-08-18 23:44:28 +02:00
2 changed files with 86 additions and 41 deletions
Showing only changes of commit ca4ea67e7b - Show all commits
+52 -7
View File
@@ -10,13 +10,48 @@
"left": -263.96, "left": -263.96,
"attrs": {} "attrs": {}
}, },
{ "type": "wokwi-ili9341", "id": "lcd1", "top": -191.24, "left": -0.38, "attrs": {} }, { "type": "wokwi-ili9341", "id": "lcd1", "top": -200.8, "left": 354.9, "attrs": {} },
{ {
"type": "wokwi-pushbutton", "type": "wokwi-pushbutton",
"id": "btn1", "id": "btn-up",
"top": 131, "top": -99.4,
"left": -124.8, "left": -76.8,
"attrs": { "color": "green", "xray": "1", "key": "1" } "attrs": { "color": "RebeccaPurple", "xray": "1", "key": "1", "label": "Up" }
},
{
"type": "wokwi-pushbutton",
"id": "btn-down",
"top": 25.4,
"left": -76.8,
"attrs": { "color": "green", "xray": "1", "key": "1", "label": "Down" }
},
{
"type": "wokwi-pushbutton",
"id": "btn-left",
"top": -32.2,
"left": -163.2,
"attrs": { "color": "yellow", "xray": "1", "key": "1", "label": "Left" }
},
{
"type": "wokwi-pushbutton",
"id": "btn-right",
"top": -32.2,
"left": 19.2,
"attrs": { "color": "red", "xray": "1", "key": "1", "label": "Right" }
},
{
"type": "wokwi-pushbutton",
"id": "btn-ok",
"top": -99.4,
"left": 115.2,
"attrs": { "color": "Magenta", "xray": "1", "key": "1", "label": "Ok" }
},
{
"type": "wokwi-pushbutton",
"id": "btn-back",
"top": 25.4,
"left": 115.2,
"attrs": { "color": "Lime", "xray": "1", "key": "1", "label": "Back" }
} }
], ],
"connections": [ "connections": [
@@ -30,8 +65,18 @@
[ "lcd1:MOSI", "esp1:35", "violet", [ "v105.6", "h-124.8", "v-144" ] ], [ "lcd1:MOSI", "esp1:35", "violet", [ "v105.6", "h-124.8", "v-144" ] ],
[ "lcd1:SCK", "esp1:36", "white", [ "v115.2", "h-144", "v-86.4" ] ], [ "lcd1:SCK", "esp1:36", "white", [ "v115.2", "h-144", "v-86.4" ] ],
[ "esp1:37", "lcd1:MISO", "magenta", [ "h57.6", "v105.6", "h172.8" ] ], [ "esp1:37", "lcd1:MISO", "magenta", [ "h57.6", "v105.6", "h172.8" ] ],
[ "btn1:1.l", "esp1:GND.2", "green", [ "h-9.6", "v-48" ] ], [ "btn-up:2.l", "esp1:38", "purple", [ "h-9.6", "v19.4" ] ],
[ "btn1:2.l", "esp1:38", "green", [ "h-9.6", "v19.4" ] ] [ "btn-up:1.l", "esp1:GND.2", "black", [ "h0" ] ],
[ "btn-down:1.l", "esp1:GND.2", "black", [ "h0" ] ],
[ "btn-down:2.l", "esp1:39", "green", [ "h-19.2", "v115.4" ] ],
[ "btn-left:2.l", "esp1:40", "yellow", [ "h0", "v173" ] ],
[ "btn-left:1.l", "esp1:GND.2", "black", [ "h0" ] ],
[ "btn-right:2.l", "esp1:41", "red", [ "h-19.2", "v153.8" ] ],
[ "btn-right:1.l", "btn-left:1.r", "black", [ "h-96", "v28.8" ] ],
[ "btn-ok:2.l", "esp1:42", "Magenta", [ "h-19.2", "v211.58" ] ],
[ "btn-ok:1.l", "btn-up:1.r", "black", [ "h0" ] ],
[ "btn-back:1.l", "btn-down:1.r", "black", [ "h0" ] ],
[ "btn-back:2.l", "esp1:45", "Lime", [ "h-9.6", "v173" ] ]
], ],
"dependencies": {} "dependencies": {}
} }
+5 -5
View File
@@ -94,11 +94,11 @@ async fn main(spawner: Spawner) {
let button_config = InputConfig::default().with_pull(Pull::Up); let button_config = InputConfig::default().with_pull(Pull::Up);
let inputs = Inputs { let inputs = Inputs {
up: Input::new(peripherals.GPIO38, button_config.clone()), up: Input::new(peripherals.GPIO38, button_config.clone()),
down: Input::new(peripherals.GPIO0, button_config.clone()), down: Input::new(peripherals.GPIO39, button_config.clone()),
left: Input::new(peripherals.GPIO1, button_config.clone()), left: Input::new(peripherals.GPIO40, button_config.clone()),
right: Input::new(peripherals.GPIO2, button_config.clone()), right: Input::new(peripherals.GPIO41, button_config.clone()),
back: Input::new(peripherals.GPIO3, button_config.clone()), back: Input::new(peripherals.GPIO42, button_config.clone()),
ok: Input::new(peripherals.GPIO4, button_config.clone()), ok: Input::new(peripherals.GPIO45, button_config.clone()),
}; };
spawner.spawn(navigation::run(inputs, display).expect("run task failed")); spawner.spawn(navigation::run(inputs, display).expect("run task failed"));