diff options
Diffstat (limited to 'Puzzle_Box/Puzzle_Box.h')
-rw-r--r-- | Puzzle_Box/Puzzle_Box.h | 52 |
1 files changed, 41 insertions, 11 deletions
diff --git a/Puzzle_Box/Puzzle_Box.h b/Puzzle_Box/Puzzle_Box.h index bd5b2fb..8a310fa 100644 --- a/Puzzle_Box/Puzzle_Box.h +++ b/Puzzle_Box/Puzzle_Box.h @@ -1,6 +1,3 @@ - - - /* Pin assignments for the version 1.1 shield */ static const int GPSrx = 4, GPStx = 3; // GPS static const int LCD_Enable = 6, LCD_RS = 5, LCD_RW = 7; // LCD @@ -15,14 +12,21 @@ void Msg(LiquidCrystal &lcd, const char *top, const char *bottom, unsigned long void drawEye(int location); void stepEyeAnimation(); void toggleEye(bool on); -void doMainStage(); -void doButtonStage(); + +void doIdle(); +void displayMessage(); +void doLatLong(); +void doHeading(); +void doEastOf(); + bool doUpdateDistance(); void doCheckOverrideSerial(); void doCheckAccess(); void PowerOff(); float toRandomUnit(int choice, float dist); -void showQuote(int quote); + +float toRandomUnit(int choice, float dist); +char* getUnitLabel(int choice); /* Fixed values should not need changing */ static const int DEF_ATTEMPT_MAX = 50; @@ -32,6 +36,37 @@ static const int EEPROM_OFFSET = 100; static const int MAIN_STAGE = 1; static const int BUTTON_STAGE = 2; +static const char MESSAGE = 3; +static const char LATLONG = 4; +static const char HEADING = 5; +static const char EASTOF = 6; +static const char OPEN = 7; + +static const byte STATES[] = { + 0, + MESSAGE, // Daniel!? Is it you? + MESSAGE, // Finally, you found me; Adventure time + LATLONG, + MESSAGE, // What's that? + HEADING, + MESSAGE, // Well that was fun, lets go back to camp + EASTOF, + MESSAGE, // Oh, btw, got you a gift + OPEN + }; + +// LATLONG +static const float LATLONG_LATITUDE = 46.09681; +static const float LATLONG_LONGITUDE = -121.65900; + +// HEADING +// 46.092838, -121.649211 +static const float HEADING_LATITUDE = 46.092838; +static const float HEADING_LONGITUDE = -121.649211; + +// EASTOF +static const float EASTOF_LONGITUDE = -121.62730; + /* Random Units */ static const int NUMBER_OF_UNITS = 4; @@ -45,9 +80,4 @@ static const int MAX_EYE_STEPS = 13; /* These values should be adjusted according to your needs */ static const int CLOSED_ANGLE = 80; // degrees static const int OPEN_ANGLE = 200; // degrees - -static const float DEST_LATITUDE = 47.272697; -static const float DEST_LONGITUDE = -122.021201; static const int RADIUS = 100; // meters - - |