Skip to content

Commit e793535

Browse files
committed
move capture delay to sfr
1 parent 3a21948 commit e793535

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/Control Tasks/CameraControlTask.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ void CameraControlTask::execute()
155155

156156
// handle taking and storing photos
157157
if (sfr::camera::take_photo == true && sfr::camera::powered == true) {
158-
// extra 200ms delay between commanding photo and triggering capture
159-
if (sfr::camera::start_progress < 8) {
158+
// extra delay (200 ms default) between commanding photo and triggering capture
159+
if (sfr::camera::start_progress < (sfr::camera::delay_count + 6)) {
160160
sfr::camera::start_progress++;
161161
#ifdef VERBOSE
162162
Serial.println("Photo triggered, delaying additional 100ms");

src/sfr.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace sfr {
1717
SFRField<uint8_t> max_stable_gyro_y = SFRField<uint8_t>((0.2 * constants::imu::sfr_resolution), 0x1502, constants::imu::sfr_resolution); // rad/s
1818
SFRField<uint8_t> min_unstable_gyro_x = SFRField<uint8_t>((0.7 * constants::imu::sfr_resolution), 0x1503, constants::imu::sfr_resolution); // rad/s
1919
SFRField<uint8_t> min_unstable_gyro_y = SFRField<uint8_t>((0.7 * constants::imu::sfr_resolution), 0x1504, constants::imu::sfr_resolution); // rad/s
20-
} // namespace detumble
20+
} // namespace detumble
2121
namespace aliveSignal {
2222
// OP Codes 1600
2323
SFRField<bool> downlinked = SFRField<bool>(false, 0x1600);
@@ -139,6 +139,7 @@ namespace sfr {
139139
SFRField<uint32_t> fragment_number_requested = SFRField<uint32_t>(0, 0x2016);
140140
SFRField<uint32_t> power_start_time = SFRField<uint32_t>(0, 0x2017);
141141
SFRField<uint32_t> power_time = SFRField<uint32_t>(400, 0x2018);
142+
SFRField<uint8_t> delay_count = SFRField<uint8_t>(2, 0x2019);
142143
} // namespace camera
143144
namespace rockblock {
144145
// OP Codes 2100
@@ -283,4 +284,4 @@ namespace sfr {
283284
SFRField<uint32_t> dynamic_data_age = SFRField<uint32_t>(0, 0x2809);
284285
SFRField<uint32_t> sfr_data_age = SFRField<uint32_t>(0, 0x2810);
285286
} // namespace eeprom
286-
}; // namespace sfr
287+
}; // namespace sfr

src/sfr.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ namespace sfr {
159159
extern SFRField<uint32_t> fragment_number_requested;
160160
extern SFRField<uint32_t> power_start_time;
161161
extern SFRField<uint32_t> power_time;
162+
extern SFRField<uint8_t> delay_count;
162163
} // namespace camera
163164
namespace rockblock {
164165
// OP Codes 2100
@@ -286,6 +287,6 @@ namespace sfr {
286287
extern SFRField<uint32_t> dynamic_data_age;
287288
extern SFRField<uint32_t> sfr_data_age;
288289
} // namespace eeprom
289-
}; // namespace sfr
290+
}; // namespace sfr
290291

291292
#endif

0 commit comments

Comments
 (0)