Start commenting code
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Blizzard Finnegan 2023-08-24 09:46:56 -04:00
parent 86e67f42cb
commit 6da1676840
Signed by: blizzardfinnegan
GPG key ID: 61C1E13067E0018E
2 changed files with 5 additions and 0 deletions

View file

@ -42,6 +42,8 @@ impl Device{
match response{
Some(response_value)=> {
match response_value{
//If we got back a password prompt, that's a bad place to be in. Send a
//newline to failout of the
Response::PasswordPrompt=>{
usb_port.write_to_device(Command::Newline);
_ = usb_port.read_from_device(None);

View file

@ -9,9 +9,12 @@ pub struct GpioPins{
impl GpioPins{
pub fn new() -> Self {
let mut output = Self { unassigned_addresses:Vec::new() };
//For each of the relay addresses...
for pin in RELAY_ADDRESSES.iter(){
match Gpio::new(){
Ok(gpio_object) =>{
//Get the relevant GPIO pin, initialise it to be off, store the address, and
//drop the pin so the Device object can pick it back up
match gpio_object.get(pin.clone()){
Ok(pin_object)=>{
_ = pin_object.into_output_low();