#pragma once

#include <iostream>
#include <string>
#include "StateBase.hpp"
#include "StateVariables.hpp"

class RecoveryState final : public StateBase
{
  private:
	enum Actions // TODO: these should be enum class, but that breaks in the base class during assignment
	{
		getCTDPressure,
		getGPSPosition,
		checkSystemState,
		createSBD,
		sendSBD,
		wait,
		lastAction
	};

  public:
	RecoveryState(std::string stateid, uint32_t timeout = 0) : StateBase{stateid, timeout}
	{
	}

  private:
	StateVariables SV;

	void doStateEntry() final;
	void doStateActions() final;
	StateNames checkEvents() final;
	void doStateExit(bool timeout) final;
	void defineActionLabels() final;

	void startGetPos();
	uint8_t finishGetPos();
	uint32_t waitCounter = 0;
	float desiredBelPos = 50.0;
};
