Commit c87c1289 authored by markus's avatar markus

Adjust to improved rotor resiliency

parent e122a04b
......@@ -305,9 +305,9 @@ uint16 Rotor::readADC(int AdcPin)
{
//Read ADC 4 times and calculate average
uint32_t adcValue = 0;
for(int i = 0; i < 128; i++)
for(int i = 0; i < 10; i++)
adcValue += analogRead(AdcPin);
delay(1);
adcValue = adcValue/128;
adcValue = adcValue/10;
return (uint16)adcValue;
}
......@@ -21,20 +21,20 @@
// Allowed span in degree
#define AZIM_SPAN 5
#define ELEV_SPAN 30
#define ELEV_SPAN 3
// Max Values
#define AZIM_MIN 0.0
#define AZIM_MAX 360.0
#define AZIM_MAX 359.0
#define ELEV_MIN 0.0
#define ELEV_MAX 180.0
// Resolution values in degree
#define AZIM_RES 1
#define ELEV_RES 15
#define ELEV_RES 1
// ADC Values
#define AZIM_ADC_MIN 0
#define AZIM_ADC_MAX 1024
#define ELEV_ADC_MIN 0
#define ELEV_ADC_MAX 1024
#define ELEV_ADC_MAX 921
#define AZIM_DEG ((AZIM_ADC_MAX-AZIM_ADC_MIN)/(AZIM_MAX-AZIM_MIN))
#define ELEV_DEG ((ELEV_ADC_MAX-ELEV_ADC_MIN)/(ELEV_MAX-ELEV_MIN))
......@@ -49,12 +49,10 @@
#define AZIM_RE_CCW 47
#define AZIM_RE_BREAK 41
// Elevation
#define ELEV_RE_UP 45
#define ELEV_RE_DWN 43
#define ELEV_RE_UP 43
#define ELEV_RE_DWN 45
#define ELEV_RE_BREAK 41
// Network Settings
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment