Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
theageoflove committed Nov 9, 2022
1 parent 42b3496 commit 4287b11
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion zeitraffer.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include <stdio.h>
#include <furi.h>
#include <../../applications/main/gpio/gpio_item.h>
#include <gui/gui.h>
#include <input/input.h>
#include <notification/notification_messages.h>

//#include <notification/notification_messages_notes.h>

int Time = 10;
Expand Down Expand Up @@ -77,6 +79,8 @@ int32_t zeitraffer_app(void* p) {
// Подключаем view port к GUI в полноэкранном режиме
gui_add_view_port(gui, view_port, GuiLayerFullscreen);

gpio_item_configure_all_pins(GpioModeOutputPushPull);

// Создаем периодический таймер с коллбэком, куда в качестве
// контекста будет передаваться наша очередь событий
FuriTimer* timer = furi_timer_alloc(timer_callback, FuriTimerTypePeriodic, event_queue);
Expand Down Expand Up @@ -177,14 +181,22 @@ int32_t zeitraffer_app(void* p) {
WorkTime--;
notification_message(notifications, &sequence_blink_blue_100);
if( WorkTime < 1 ) {

WorkCount--;
view_port_update(view_port);
gpio_item_set_all_pins(true);
//gpio_item_set_pin(6, true);
furi_delay_ms(300);
//gpio_item_set_pin(6, false);
gpio_item_set_all_pins(false);

if (InfiniteShot) WorkCount++;
notification_message(notifications, &sequence_click);
WorkTime = Time;
view_port_update(view_port);

}
if( WorkCount < 1 ) {
gpio_item_set_all_pins(false);
furi_timer_stop(timer);
notification_message(notifications, &sequence_audiovisual_alert);
WorkTime = 3;
Expand Down
Binary file modified zeitraffer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4287b11

Please sign in to comment.