bump update time to 5 minutes
This commit is contained in:
parent
933ac7f9bf
commit
e8f5f00386
2 changed files with 4 additions and 4 deletions
|
@ -1,2 +1,3 @@
|
||||||
[target.arm-unknown-linux-gnueabihf]
|
[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"
|
image = "rustcross/arm-unknown-linux-gnueabihf"
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
use embedded_graphics::{mono_font::MonoTextStyle, prelude::*, text::Text};
|
|
||||||
use linux_embedded_hal::{
|
use linux_embedded_hal::{
|
||||||
spidev::{SpiModeFlags, SpidevOptions},
|
spidev::{SpiModeFlags, SpidevOptions},
|
||||||
sysfs_gpio::Direction,
|
sysfs_gpio::Direction,
|
||||||
Delay, Pin, Spidev,
|
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 ssd1675::{Builder, Color, Dimensions, Display, GraphicDisplay, Rotation};
|
||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
use std::time::Duration;
|
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
|
// Activate SPI, GPIO in raspi-config needs to be run with sudo because of some sysfs_gpio
|
||||||
// permission problems and follow-up timing problems
|
// 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 display = GraphicDisplay::new(display, &mut black_buffer, &mut red_buffer);
|
||||||
|
|
||||||
let mut state = ApplicationState::default();
|
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
|
// Main loop. updates the screen after a fixed time interval with the next screen
|
||||||
loop {
|
loop {
|
||||||
|
@ -107,6 +106,6 @@ fn main() -> Result<(), std::io::Error> {
|
||||||
println!("Finished - going to sleep");
|
println!("Finished - going to sleep");
|
||||||
display.deep_sleep()?;
|
display.deep_sleep()?;
|
||||||
|
|
||||||
sleep(one_minute);
|
sleep(five_minutes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue