// SPDX-License-Identifier: Apache-2.0 // Copyright (c) 2012-2024 Scott Penrose and WII5 Buoy contributors // // This file is part of WII5 Buoy firmware. // See LICENSE for full terms. /** * @file WII5ModeManualTest.h * @brief Manual test mode: operator-driven hardware exercise via the console. */ #ifndef WII5ModeManualTest_h #define WII5ModeManualTest_h #include #include #include /** * @brief Manual test mode: operator-driven hardware exercise. * * Provides a console REPL where the operator types single-letter * commands ("X;", "G;", etc.) to exercise individual subsystems * (LEDs, buttons, GPS, Iridium, Sparton, SD cards, etc.). Used in the * lab and during pre-deployment checkout. */ class WII5ModeManualTest : public WII5Mode { public: WII5ModeManualTest() {} /** @brief Reset internal counters. */ void reset(); /** @brief One-time bring-up. */ void begin(); /** @brief Tick: read console, dispatch one-shot test commands. */ void loop(); bool enableMetadata; bool enableIridium; bool enableGps; bool enableSparton; bool enableBattery; bool waitGPS; // virtual void metadataPrint(File* fh); protected: elapsedMillis wait; uint8_t pulsePin; elapsedMillis pulseWait; // Lots of improvement... }; extern WII5ModeManualTest wii5ModeManualTest; #endif