mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
OP-295 Get CC pin mappings consistent for using the temperature sensor
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2565 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
edced9177c
commit
108ea8c959
@ -140,16 +140,15 @@ void updateSensors()
|
||||
struct pios_adxl345_data accel_data;
|
||||
|
||||
|
||||
attitudeRaw.gyros[ATTITUDERAW_GYROS_X] = PIOS_ADC_PinGet(0);
|
||||
attitudeRaw.gyros[ATTITUDERAW_GYROS_Y] = PIOS_ADC_PinGet(1);
|
||||
attitudeRaw.gyros[ATTITUDERAW_GYROS_Z] = PIOS_ADC_PinGet(2);
|
||||
attitudeRaw.gyros[ATTITUDERAW_GYROS_X] = PIOS_ADC_PinGet(1);
|
||||
attitudeRaw.gyros[ATTITUDERAW_GYROS_Y] = PIOS_ADC_PinGet(2);
|
||||
attitudeRaw.gyros[ATTITUDERAW_GYROS_Z] = PIOS_ADC_PinGet(3);
|
||||
|
||||
attitudeRaw.gyros_filtered[ATTITUDERAW_GYROS_FILTERED_X] = -(attitudeRaw.gyros[ATTITUDERAW_GYROS_X] - GYRO_NEUTRAL) * GYRO_SCALE;
|
||||
attitudeRaw.gyros_filtered[ATTITUDERAW_GYROS_FILTERED_Y] = (attitudeRaw.gyros[ATTITUDERAW_GYROS_Y] - GYRO_NEUTRAL) * GYRO_SCALE;
|
||||
attitudeRaw.gyros_filtered[ATTITUDERAW_GYROS_FILTERED_Z] = (attitudeRaw.gyros[ATTITUDERAW_GYROS_Z] - GYRO_NEUTRAL) * GYRO_SCALE;
|
||||
|
||||
attitudeRaw.gyrotemp[0] = PIOS_ADXL345_Read(&accel_data);
|
||||
attitudeRaw.gyrotemp[1] = PIOS_ADC_PinGet(3);
|
||||
|
||||
attitudeRaw.accels[ATTITUDERAW_ACCELS_X] = accel_data.x;
|
||||
attitudeRaw.accels[ATTITUDERAW_ACCELS_Y] = accel_data.y;
|
||||
|
@ -163,25 +163,25 @@ TIM4 | RC In 1 | Servo 3 | Servo 2 | Servo 1
|
||||
//-------------------------
|
||||
//#define PIOS_ADC_OVERSAMPLING_RATE 1
|
||||
#define PIOS_ADC_USE_TEMP_SENSOR 1
|
||||
#define PIOS_ADC_TEMP_SENSOR_ADC ADC2
|
||||
#define PIOS_ADC_TEMP_SENSOR_ADC_CHANNEL 2
|
||||
#define PIOS_ADC_TEMP_SENSOR_ADC ADC1
|
||||
#define PIOS_ADC_TEMP_SENSOR_ADC_CHANNEL 1
|
||||
|
||||
#define PIOS_ADC_PIN1_GPIO_PORT GPIOA // PA4 (Gyro X)
|
||||
#define PIOS_ADC_PIN1_GPIO_PIN GPIO_Pin_4 // ADC12_IN4
|
||||
#define PIOS_ADC_PIN1_GPIO_CHANNEL ADC_Channel_4
|
||||
#define PIOS_ADC_PIN1_ADC ADC1
|
||||
#define PIOS_ADC_PIN1_ADC ADC2
|
||||
#define PIOS_ADC_PIN1_ADC_NUMBER 1
|
||||
|
||||
#define PIOS_ADC_PIN2_GPIO_PORT GPIOA // PA5 (Gyro Y)
|
||||
#define PIOS_ADC_PIN2_GPIO_PIN GPIO_Pin_5 // ADC123_IN5
|
||||
#define PIOS_ADC_PIN2_GPIO_CHANNEL ADC_Channel_5
|
||||
#define PIOS_ADC_PIN2_ADC ADC2
|
||||
#define PIOS_ADC_PIN2_ADC_NUMBER 1
|
||||
#define PIOS_ADC_PIN2_ADC ADC1
|
||||
#define PIOS_ADC_PIN2_ADC_NUMBER 2
|
||||
|
||||
#define PIOS_ADC_PIN3_GPIO_PORT GPIOA // PA3 (Gyro Z)
|
||||
#define PIOS_ADC_PIN3_GPIO_PIN GPIO_Pin_3 // ADC12_IN3
|
||||
#define PIOS_ADC_PIN3_GPIO_CHANNEL ADC_Channel_3
|
||||
#define PIOS_ADC_PIN3_ADC ADC1
|
||||
#define PIOS_ADC_PIN3_ADC ADC2
|
||||
#define PIOS_ADC_PIN3_ADC_NUMBER 2
|
||||
|
||||
#define PIOS_ADC_NUM_PINS 3
|
||||
|
Loading…
Reference in New Issue
Block a user