Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AlarmGpioPin is the pin where the alarm is connected AlarmGpioPin = 183 // J18 - pin 8 // AlarmGpioPWM is the pwm where the alarm is connected AlarmGpioPWM = 3 // SwitchGpioPin is the pin where the autopilot switch is connected SwitchGpioPin = 46 // J19 - pin 5 // MotorDirPin is the direction pin for the motor MotorDirPin = 165 // J18 - pin 2 // MotorSleepPin is the sleep pin for the motor MotorSleepPin = 12 // J18 - pin 7 // MotorStepPin is the step pin for the motor MotorStepPin = 182 // J17 - pin 1 // MotorStepPwm is the pwm where the step pin of the motor is connected MotorStepPwm = 2 // I2CBus of the Sin/Cos interface I2CBus = 6 // SinAddress is the i2c address of the Sine DAC (MCP4725) SinAddress = 0x62 // CosAddress is the i2c address of the Cosine DAC (MCP4725) CosAddress = 0x63 )
Variables ¶
View Source
var Conf = loadConfiguration()
Conf contains the configuration parameters loaded at the initialization from the edisonIsThePilot.properties or defaults values
View Source
var MessageToPin = []MessagePin{ {dashboard.NoGPSFix, 43}, {dashboard.InvalidGPSData, 48}, {dashboard.SpeedTooLow, 40}, {dashboard.HeadingErrorOutOfBounds, 82}, {dashboard.CorrectionAtLimit, 83}, }
MessageToPin contains the mapping of the dashboard messages to the LED pin
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Bounds float64 // error bound in degree SteeringReductionRatio float64 // reduction ratio between the motor and the steering wheel MaxPIDOutputLimits float64 // maximum pid output value (in degree) MinPIDOutputLimits float64 // minimum pid output value (in degree) P float64 // Proportional coefficient I float64 // Integrative coefficient D float64 // Derivative coefficient N float64 // Derivative filter coefficient GpsSerialPort string NoInputMessageTimeoutInSeconds int64 MinimumSpeedInKnots float64 TraceSize uint32 }
Configuration is the type of the configuration loaded from the config file
type MessagePin ¶
MessagePin is the mapping of pin to a message
Click to show internal directories.
Click to hide internal directories.