bump update time to 5 minutes

This commit is contained in:
Felix Suchert 2023-06-06 19:52:26 +02:00
parent 933ac7f9bf
commit e8f5f00386
Signed by: feliix42
GPG key ID: 24363525EA0E8A99
2 changed files with 4 additions and 4 deletions

View file

@ -1,2 +1,3 @@
[target.arm-unknown-linux-gnueabihf]
pre-build = ["dpkg --add-architecture armhf && apt-get update && apt-get install --assume-yes libssl-dev:armhf"]
image = "rustcross/arm-unknown-linux-gnueabihf"

View file

@ -1,13 +1,12 @@
use embedded_graphics::{mono_font::MonoTextStyle, prelude::*, text::Text};
use linux_embedded_hal::{
spidev::{SpiModeFlags, SpidevOptions},
sysfs_gpio::Direction,
Delay, Pin, Spidev,
};
use profont::{PROFONT_12_POINT, PROFONT_14_POINT, PROFONT_24_POINT, PROFONT_9_POINT};
use ssd1675::{Builder, Color, Dimensions, Display, GraphicDisplay, Rotation};
use std::thread::sleep;
use std::time::Duration;
use inky_ticker::ApplicationState;
// Activate SPI, GPIO in raspi-config needs to be run with sudo because of some sysfs_gpio
// permission problems and follow-up timing problems
@ -89,7 +88,7 @@ fn main() -> Result<(), std::io::Error> {
let mut display = GraphicDisplay::new(display, &mut black_buffer, &mut red_buffer);
let mut state = ApplicationState::default();
let one_minute = Duration::from_secs(60);
let five_minutes = Duration::from_secs(300);
// Main loop. updates the screen after a fixed time interval with the next screen
loop {
@ -107,6 +106,6 @@ fn main() -> Result<(), std::io::Error> {
println!("Finished - going to sleep");
display.deep_sleep()?;
sleep(one_minute);
sleep(five_minutes);
}
}