Commit graph

8 commits

Author SHA1 Message Date
finga 343b95dc78 fw-rust: Refactor printing to the LCD
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Pass iterators for control and display data to the printing function
instead of just printing it.
2022-04-10 18:18:37 +02:00
finga 027a3b3444 fw-rust: Remove module prefix if already used.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Now, use everywhere `block!` instead of `nb::block!`, except when only
used once.
2022-04-08 01:26:30 +02:00
finga eb87f77d0a fw-rust: Remove wrap around of values in setup
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-04-08 00:19:15 +02:00
finga b51511dbab fw-rust: Improve setup screen
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Remove redundant match arms when handling inputs and code when drawing
the setup screen.
2022-04-03 01:40:18 +02:00
finga 7f14974146 fw-rust: Remove unnecessary Draw trait
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-04-03 01:23:06 +02:00
finga fdd1f4636d fw-rust: Refactor everything
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Remove avr-eeprom dependency for now and introduce events.
2022-03-30 22:59:24 +02:00
finga 7d8f5f6870 fw-rust: Create a print u8 function for setup
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Create `print_u8()` helper function to print `u8` primitives to
lcd. Refactor contrast and backlight variables to also keep them in a
global `AtomicU8`.
2022-03-21 12:46:18 +01:00
finga c2920ea334 fw-rust: Break everything down in multiple files
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
To reduce length of `main.rs` and therefor improve readability create
source files for:

- Assets (`assets.rs`): Contains all graphical assets such as the
  splash screen assets, symbols and the symbol table.
- LCD (`lcd.rs`): Contains all lower level things regarding the LCD
  such as the `Lcd` struct and its implementations.
- Screen (`screen/mod.rs`):
    - Splash (`screen/splash.rs`)
    - Home (`screen/home.rs`)
    - Setup (`screen/setup.rs`)

In the future it would probably make sense to move the LCD module into
the screen module.
2022-03-18 11:19:36 +01:00