rotor.h 860 Bytes
Newer Older
andz's avatar
andz committed
1
2
3
4
5
6
///
/// @file       rotor.h
/// @copyright  Christian Obersteiner, Andreas Müller - CC-BY-SA 4.0
///
/// @brief  Contains all kind of rotor functions
///
chris007's avatar
chris007 committed
7
8
9
10
11

#ifndef ROTOR_H
#define ROTOR_H

#include "settings.h"
andz's avatar
andz committed
12
#include "Arduino.h"
chris007's avatar
chris007 committed
13
14
15
16

class CRotor
{
public:
andz's avatar
andz committed
17
18
19
20
21
22
23
24
25
26
27
28
    enum rotorError { ROT_OK, 
                    ROT_NOK, 
                    ROT_VAL_OUT_OF_RANGE };
    CRotor();
    void initRotor();
    void doRotor();
    void debugOut();
    uint16 getActualAzimuth() const;
    uint16 getActualElevation() const;

    rotorError setAzimuth(uint16);
    rotorError setElevation(uint16);
chris007's avatar
chris007 committed
29
30

private:
andz's avatar
andz committed
31
32
    rotorError readRotSensors();
    uint16 readADC(int);
33

andz's avatar
andz committed
34
35
36
37
38
39
    uint16 m_uActualAzimuth;
    uint16 m_uActualElevation;
    uint16 m_uSetAzimuth;
    uint16 m_uSetElevation;
    byte m_bAzimuthBreakReleased;
    byte m_bElevationBreakReleased;
chris007's avatar
chris007 committed
40
41
42
};

#endif //ROTOR_H