Skip to content

Commit

Permalink
Fixes before pool test
Browse files Browse the repository at this point in the history
  • Loading branch information
rjp5th committed May 17, 2023
1 parent b8dde64 commit 773db48
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
10 changes: 5 additions & 5 deletions lib/driver_status_strip/status_strip.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ bool __time_critical_func(status_strip_refresh)(__unused repeating_timer_t *rt)
}
}

// Finally update the front set of LEDs
// Finally update the rear set of LEDs
if (inst->first_pixel_is_rear) {
inst->end_cmd.data = command.data;
inst->middle_cmd.data = flash_command.data;
}
else {
inst->middle_cmd.data = command.data;
inst->end_cmd.data = flash_command.data;
}
else {
inst->end_cmd.data = command.data;
inst->middle_cmd.data = flash_command.data;
}
}
else {
inst->end_cmd.data = command.data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"-DUCLIENT_PROFILE_SERIAL=OFF",
"-DUCLIENT_PROFILE_STREAM_FRAMING=ON",
"-DUCLIENT_PROFILE_CUSTOM_TRANSPORT=ON",
"-DUCLIENT_MIN_SESSION_CONNECTION_INTERVAL=30",
"-DUCLIENT_MIN_SESSION_CONNECTION_ATTEMPTS=1"
"-DUCLIENT_MIN_SESSION_CONNECTION_INTERVAL=300",
"-DUCLIENT_MIN_SESSION_CONNECTION_ATTEMPTS=3"
]
},
"rmw_microxrcedds": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ pushd firmware/mcu_ws > /dev/null
vcs import --input extra_packages.repos
popd > /dev/null

# Workaround: The software team enjoys pain.
git clone -b actuators-msgs https://github.com/osu-uwrt/riptide_core
# Workaround: The software team enjoys pain.
git clone https://github.com/osu-uwrt/riptide_core
cp -R riptide_core/riptide_msgs ros2/riptide_msgs
rm -rf riptide_core

Expand Down
12 changes: 7 additions & 5 deletions talos/CameraCageBB/src/ros.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,17 @@ static void physkill_notify_subscription_callback(const void * msgin)
}

static alarm_id_t toggle_pwr_alarm_id = 0;
static bool toggle_state = false;

static int64_t set_computer_power(__unused alarm_id_t alarm, void * data){
bool state = (bool) data;
gpio_put(ORIN_SW_PIN, state);
static int64_t set_computer_power(__unused alarm_id_t alarm, __unused void * data){
gpio_put(ORIN_SW_PIN, toggle_state);

if (state) {
if (toggle_state) {
toggle_pwr_alarm_id = 0;
return 0; // Don't reschedule if turning on
} else {
return 1000 * 1000; // Turn off for 1 second
toggle_state = !toggle_state;
return 5000 * 1000; // Turn off for 5 seconds
}
}

Expand All @@ -150,6 +151,7 @@ static void elec_command_subscription_callback(const void * msgin){
LOG_WARN("Attempting to request multiple cycles in a row");
}
else {
toggle_state = false;
toggle_pwr_alarm_id = add_alarm_in_ms(10, &set_computer_power, (void *) false, true);
if (toggle_pwr_alarm_id < 0) {
toggle_pwr_alarm_id = 0;
Expand Down
1 change: 0 additions & 1 deletion talos/PowerBoard/src/ros.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <rclc/rclc.h>
#include <rclc/executor.h>
#include <riptide_msgs2/msg/firmware_status.h>
#include <riptide_msgs2/msg/robot_state.h>
#include <riptide_msgs2/msg/kill_switch_report.h>
#include <riptide_msgs2/msg/electrical_readings.h>
#include <riptide_msgs2/msg/electrical_command.h>
Expand Down

0 comments on commit 773db48

Please sign in to comment.