Skip to content

Commit

Permalink
pass in target spin resolution and increase min stable gyro z
Browse files Browse the repository at this point in the history
  • Loading branch information
ljgreenhill committed Mar 25, 2024
1 parent b8c3aa4 commit 60978a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sfr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace sfr {
} // namespace boot
namespace detumble {
// OP Codes 1500
SFRField<uint8_t> min_stable_gyro_z = SFRField<uint8_t>((0.8 * sfr::acs::target_spin_rate.get_float() * constants::imu::sfr_resolution), 0x1500, constants::imu::sfr_resolution); // rad/s
SFRField<uint8_t> min_stable_gyro_z = SFRField<uint8_t>((4.0 * sfr::acs::target_spin_rate.get_float() * constants::imu::sfr_resolution), 0x1500, constants::imu::sfr_resolution); // rad/s
SFRField<uint8_t> max_stable_gyro_x = SFRField<uint8_t>((0.1 * constants::imu::sfr_resolution), 0x1501, constants::imu::sfr_resolution); // rad/s
SFRField<uint8_t> max_stable_gyro_y = SFRField<uint8_t>((0.1 * constants::imu::sfr_resolution), 0x1502, constants::imu::sfr_resolution); // rad/s
SFRField<uint8_t> min_unstable_gyro_x = SFRField<uint8_t>((0.7 * constants::imu::sfr_resolution), 0x1503, constants::imu::sfr_resolution); // rad/s
Expand Down Expand Up @@ -217,7 +217,7 @@ namespace sfr {
SFRField<bool> off = SFRField<bool>(true, 0x2500);
SFRField<uint8_t> mode = SFRField<uint8_t>((uint8_t)acs_mode_type::detumble, 0x2501);
SFRField<uint8_t> simple_mag = SFRField<uint8_t>((uint8_t)mag_type::z, 0x2502);
SFRField<uint8_t> target_spin_rate = SFRField<uint8_t>(5.0 * constants::acs::spin_resolution, 0x2503);
SFRField<uint8_t> target_spin_rate = SFRField<uint8_t>(5.0 * constants::acs::spin_resolution, constants::acs::spin_resolution, 0x2503);
SFRField<uint32_t> simple_current = SFRField<uint32_t>((0 - constants::acs::current_offset) * constants::acs::current_resolution, (-0.25 - constants::acs::current_offset) * constants::acs::current_resolution, (0.25 - constants::acs::current_offset) * constants::acs::current_resolution, 0x2504, constants::acs::current_resolution, constants::acs::current_offset);
SFRField<uint32_t> on_time = SFRField<uint32_t>(5 * constants::time::one_minute, 0, constants::time::one_revolution, 0x2505);
SFRField<uint32_t> Id_index = SFRField<uint32_t>(0, 0, (sizeof(constants::acs::Id_values) / sizeof(constants::acs::Id_values[0])) - 1, 0x2506);
Expand Down

0 comments on commit 60978a5

Please sign in to comment.