Skip to content

Commit

Permalink
Minor whitespace and comment fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidEGrayson committed Jul 21, 2023
1 parent 0394946 commit 8f378bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CPPFLAGS += $(shell pkg-config --cflags $(EIGEN_NAME))
LDLIBS += -lboost_program_options

# Put debugging info in there so we can get stack traces.
#CPPFLAGS += -g -rdynamic
#CPPFLAGS += -g -rdynamic -O0

# Generate .d files with dependency info
CPPFLAGS += -MD -MP
Expand Down
6 changes: 3 additions & 3 deletions minimu9-ahrs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ void ahrs(imu & imu, fuse_function * fuse, rotation_output_function * output)
loop_pacer.set_period_ns(20000000);

auto start = std::chrono::steady_clock::now();
while(1)
while (1)
{
auto last_start = start;
start = std::chrono::steady_clock::now();
std::chrono::nanoseconds duration = start - last_start;
float dt = duration.count() / 1e9;
if (dt < 0){ throw std::runtime_error("Time went backwards."); }
if (dt < 0) { throw std::runtime_error("Time went backwards."); }

vector angular_velocity = imu.read_gyro();
vector acceleration = imu.read_acc();
Expand All @@ -200,7 +200,7 @@ int main_with_exceptions(int argc, char **argv)
{
prog_options options = get_prog_options(argc, argv);

if(options.show_help)
if (options.show_help)
{
print_command_line_options_desc();
std::cout << "For more information, run: man minimu9-ahrs" << std::endl;
Expand Down

0 comments on commit 8f378bf

Please sign in to comment.