/*
  Copyright (c) 2025-2026 Kay Kasper
  under the MIT License (MIT)
*/

#include "Common.h"
#include "SwitchTests.h"
#include "SwitchMappingTests.h"
#include "PushButtonTests.h"
#include "PushButton2Tests.h"
#include "RotaryEncoderTests.h"
#include "RotaryEncoderStrictTests.h"
#include "RotaryEncoder2Tests.h"

/*
  Example that tests the functionality of Switch,
  PushButtonDoubleLongAnalyzer, PushButtonRepeatAnalyzer,
  RotaryEncoder, RotaryEncoderAnalyzer,
  RotaryEncoderAnalyzerStrict and RotaryEncoderAnalyzer2
  classes. Several checks and performance measurements
  are done continously in the loop.

  Prerequisite is the Serial class for
  writing the output.
*/

// the setup function is called once for initialization
void setup() {
  // for showing relevant information
  Serial.begin(9600);
  Serial.println("Test started");
}


// the loop function runs over and over again forever
void loop() {
  doSwitchTests(ID_SWITCHTEST);
  doSwitchMappingTests(ID_SWITCHMAPPINGTEST);
  doPushButtonTests(ID_PUSHBUTTONTEST);
  doPushButton2Tests(ID_PUSHBUTTONTEST2);
  doRotaryEncoderTests(ID_ENCODERTEST);
  doRotaryEncoderStrictTests(ID_ENCODERSTRICTTEST);
  doRotaryEncoder2Tests(ID_ENCODER2TEST);
  delay(3000);
}
