From 1285f5a32c1881294dba20d447d608466bce08dc Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 28 Sep 2017 22:30:33 +0200 Subject: [PATCH] minor adjustments. return instead of goto --- armsrc/Standalone/hf_young.c | 8 +++----- armsrc/Standalone/lf_samyrun.c | 4 ++-- armsrc/Standalone/lf_samyrun.h | 3 ++- armsrc/Standalone/standalone.h | 1 + 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/armsrc/Standalone/hf_young.c b/armsrc/Standalone/hf_young.c index 5db6aa3df..948680e81 100644 --- a/armsrc/Standalone/hf_young.c +++ b/armsrc/Standalone/hf_young.c @@ -34,7 +34,7 @@ void RunMod() { for (;;) { WDT_HIT(); // exit from Standalone Mode, send a usbcommand. - if (usb_poll_validate_length()) goto out; + if (usb_poll_validate_length()) return; SpinDelay(300); @@ -52,7 +52,7 @@ void RunMod() { for (;;) { // exit from Standalone Mode, send a usbcommand. - if (usb_poll_validate_length()) goto out; + if (usb_poll_validate_length()) return; if (BUTTON_PRESS()) { if (cardRead[selected]) { @@ -201,7 +201,7 @@ void RunMod() { DbpString("Playing"); for ( ; ; ) { // exit from Standalone Mode, send a usbcommand. - if (usb_poll_validate_length()) goto out; + if (usb_poll_validate_length()) return; int button_action = BUTTON_HELD(1000); if ( button_action == 0) { // No button action, proceed with sim @@ -258,6 +258,4 @@ void RunMod() { LED(selected + 1, 0); } } - // time to exit standalone mode -out: } \ No newline at end of file diff --git a/armsrc/Standalone/lf_samyrun.c b/armsrc/Standalone/lf_samyrun.c index f78c7bd78..20aae9054 100644 --- a/armsrc/Standalone/lf_samyrun.c +++ b/armsrc/Standalone/lf_samyrun.c @@ -31,7 +31,7 @@ void RunMod() { // Was our button held down or pressed? int button_pressed = BUTTON_HELD(1000); - SpinDelay(300); + //SpinDelay(300); // Button was held for a second, begin recording if (button_pressed > 0 && cardRead == 0) { @@ -131,4 +131,4 @@ void RunMod() { } } } -} +} \ No newline at end of file diff --git a/armsrc/Standalone/lf_samyrun.h b/armsrc/Standalone/lf_samyrun.h index 9c74ebd0a..cf21e1261 100644 --- a/armsrc/Standalone/lf_samyrun.h +++ b/armsrc/Standalone/lf_samyrun.h @@ -12,10 +12,11 @@ #ifndef __LF_SAMYRUN_H #define __LF_SAMYRUN_H -#include // for bool +//#include // for bool #include "standalone.h" // standalone definitions #include "apps.h" // debugstatements, lfops? + #define OPTS 2 #endif /* __LF_SAMYRUN_H */ \ No newline at end of file diff --git a/armsrc/Standalone/standalone.h b/armsrc/Standalone/standalone.h index 59b1d1a52..53d5ff13d 100644 --- a/armsrc/Standalone/standalone.h +++ b/armsrc/Standalone/standalone.h @@ -12,6 +12,7 @@ #define __STANDALONE_H #include // for bool +#include // PRIu64 extern void RunMod();