st-4-esp32/test/mocks/mock_state.h
Ryan Malloy 71e5484507 Add native tests, ASCOM Alpaca API, and README
Native test suite (61 tests, 5 suites) with thin mock layer for
Arduino/FreeRTOS/esp_timer enabling host-side testing without hardware.

ASCOM Alpaca REST API on port 32323 with UDP discovery, implementing
Telescope v3 interface for N.I.N.A., PHD2, and compatible software.
Follows existing ST4WiFi conditional compilation pattern.

README documents wiring, all three protocols (serial, WebSocket, Alpaca),
pin/rate configuration, and build instructions.
2026-02-18 13:40:34 -07:00

18 lines
484 B
C++

// Mock state shared across all mock implementations for native testing
#pragma once
#include <cstdint>
#include <map>
#include <string>
namespace MockState {
extern int64_t mockTimeMicros;
extern std::map<int, int> gpioStates;
extern std::map<int, int> gpioModes;
extern std::string serialInput;
extern std::string serialOutput;
void reset();
void advanceTime(int64_t microseconds);
void setSerialInput(const std::string& input);
}