diff --git a/machines/agb02/_configuration.nix b/machines/agb02/_configuration.nix index 699b08f..f069fef 100644 --- a/machines/agb02/_configuration.nix +++ b/machines/agb02/_configuration.nix @@ -25,6 +25,8 @@ in systemd.services."agb-control-box" = { wantedBy = [ "multi-user.target" ]; + wants = [ "network-online.target" ]; + after = [ "network-online.target" ]; unitConfig.Description = "The program of the control-box"; serviceConfig = { Restart = "always"; diff --git a/machines/agb02/agb/agb.cpp b/machines/agb02/agb/agb.cpp index 05692b9..022d132 100644 --- a/machines/agb02/agb/agb.cpp +++ b/machines/agb02/agb/agb.cpp @@ -18,8 +18,8 @@ constexpr double joystick_movement = 0.2; const gpiod::line::offsets drive_down = { 21, 13, 6 }; -const gpiod::line::offsets decoder = { 3, 4, 17, 27, 24, 23, 18, 15 }; // lsbf -const gpiod::line::offsets joystick = { 26, 19, 0, 5 }; // x+, y+, x-, y- +const gpiod::line::offsets decoder = { 3, 4, 17, 27, 24, 23, 18, 2 }; // lsbf +const gpiod::line::offsets joystick = { 19, 26, 5, 0 }; // x+, y+, x-, y- const gpiod::line::offset black_button = 20; const gpiod::line::offset white_button = 16;