Parcourir la source

Merge pull request #7 from Nem0oo/minor_changes

the intervalometer takes a pic on start then launch the timer + comments
Guillaume COURTOT il y a 3 ans
Parent
commit
25047b6d1f
1 fichiers modifiés avec 9 ajouts et 5 suppressions
  1. 9 5
      bt_trigger.c

+ 9 - 5
bt_trigger.c

@@ -54,10 +54,14 @@ __int32_t bt_trigger_app(void *p){
                             app->shooting = false;
                             app->running = false;
                             break;
-                        case(InputKeyOk):
+                        case(InputKeyOk): //Take a shot and start intervalometer
                             if(app->delay > 0){
                                 app->shooting = !app->shooting;
                                 if(app->shooting){
+                                    furi_hal_bt_hid_consumer_key_press(HID_CONSUMER_VOLUME_INCREMENT);
+                                    furi_hal_bt_hid_consumer_key_release(HID_CONSUMER_VOLUME_INCREMENT);
+                                    notification_message(app->notifications, &sequence_blink_blue_100);
+                                    app->shots++;
                                     //Timer triggered every delay ms    
                                     furi_timer_start(timer, app->delay * 1000);
                                 }else{
@@ -66,22 +70,22 @@ __int32_t bt_trigger_app(void *p){
                                 }
                             }
                             break;
-                        case(InputKeyUp):
+                        case(InputKeyUp): //Increase delay
                             if(!app->shooting){
                                 app->delay++;
                             }
                             break;
-                        case(InputKeyDown):
+                        case(InputKeyDown): //Decrease delay
                             if(!app->shooting && app->delay > 1){
                                 app->delay--;
                             }
                             break;
-                        case(InputKeyLeft):
+                        case(InputKeyLeft): //Reset shots counter
                             if(!app->shooting){
                                 app->shots = 0;
                             }
                             break;
-                        case(InputKeyRight):
+                        case(InputKeyRight): //Take a shot
                             if(!app->shooting){
                                 furi_hal_bt_hid_consumer_key_press(HID_CONSUMER_VOLUME_INCREMENT);
                                 furi_hal_bt_hid_consumer_key_release(HID_CONSUMER_VOLUME_INCREMENT);