Skip to content

Commit

Permalink
up firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Aug 5, 2024
1 parent 0708da6 commit 2f4ec56
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/core0_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,7 @@ pub fn frame_acquisition_loop(
prev_frame_needs_transfer = false;
} else if message == Core1Task::RequestReset.into() {
info!("Requested reset");
watchdog.feed();
watchdog.start(8000.micros());
watchdog.start(100.micros());
loop {
// Wait until the watchdog timer kills us.
nop();
Expand Down
10 changes: 5 additions & 5 deletions src/core1_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,8 @@ pub fn core_1_task(
),
&mut flash_storage,
);
if !making_status_recording && true
|| motion_detection.as_ref().unwrap().was_false_positive()
if !making_status_recording
&& motion_detection.as_ref().unwrap().was_false_positive()
// && cptv_stream.num_frames <= 100
{
info!(
Expand Down Expand Up @@ -1049,15 +1049,15 @@ pub fn core_1_task(

synced_date_time = match shared_i2c.get_datetime(&mut delay) {
Ok(now) => SyncedDateTime::new(get_naive_datetime(now), &timer),
Err(e) => {
Err(err_str) => {
event_logger.log_event(
LoggerEvent::new(
LoggerEventKind::RtcCommError,
synced_date_time.get_timestamp_micros(&timer),
),
&mut flash_storage,
);
error!("Unable to get DateTime from RTC: {}", e);
error!("Unable to get DateTime from RTC: {}", err_str);
synced_date_time
}
};
Expand Down Expand Up @@ -1311,7 +1311,7 @@ pub fn core_1_task(
// (one_min_check_end - one_min_check_start).to_micros(),
// (frame_transfer_end - frame_transfer_start).to_micros()
// );
if record_audio && made_startup_status_recording {
if record_audio {
if !audio_pending && synced_date_time.date_time_utc > next_audio_alarm.unwrap() {
//Should we be checking alarm triggered? or just us ethis and clear alarm
audio_pending = true;
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ use rp2040_hal::I2C;
// NOTE: The version number here isn't important. What's important is that we increment it
// when we do a release, so the tc2-agent can match against it and see if the version is correct
// for the agent software.
pub const FIRMWARE_VERSION: u32 = 13;
pub const FIRMWARE_VERSION: u32 = 14;
pub const EXPECTED_ATTINY_FIRMWARE_VERSION: u8 = 1; // Checking against the attiny Major version. // TODO Check against minor version also.
// const ROSC_TARGET_CLOCK_FREQ_HZ: u32 = 150_000_000;

Expand Down

0 comments on commit 2f4ec56

Please sign in to comment.