Skip to content

Commit

Permalink
add status update notification (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
pifopi authored Dec 28, 2023
1 parent 10bbfef commit c15a919
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ FlyingTrialFarmer::FlyingTrialFarmer()
LockMode::UNLOCK_WHILE_RUNNING,
false
)
, NOTIFICATION_STATUS_UPDATE("Status Update", true, false, std::chrono::seconds(3600))
, NOTIFICATIONS({
&NOTIFICATION_STATUS_UPDATE,
&NOTIFICATION_PROGRAM_FINISH,
&NOTIFICATION_ERROR_FATAL,
})
Expand Down Expand Up @@ -248,6 +250,7 @@ void FlyingTrialFarmer::program(SingleSwitchProgramEnvironment& env, BotBaseCont
}

env.update_stats();
send_program_status_notification(env, NOTIFICATION_STATUS_UPDATE);
}

send_program_finished_notification(env, NOTIFICATION_PROGRAM_FINISH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class FlyingTrialFarmer : public SingleSwitchProgramInstance{
EnumDropdownOption<FlightPath> FLIGHT_PATH;

BooleanCheckBoxOption INVERT_CONTROLS_WHILE_FLYING;
EventNotificationOption NOTIFICATION_STATUS_UPDATE;
EventNotificationsOption NOTIFICATIONS;

bool run_rewards(SingleSwitchProgramEnvironment& env, BotBaseContext& context);
Expand Down

0 comments on commit c15a919

Please sign in to comment.