Skip to content

Commit

Permalink
Align left right of OBSPro sensors (V 2)
Browse files Browse the repository at this point in the history
- fixes #367
- Assumes the GPS Logo points to the sky
- Default: The side where the LED and screw heads are visible through the case is Left, The plain side (no screws) is right
  • Loading branch information
amandel committed Sep 14, 2024
1 parent 2ba099e commit 292e14d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/OpenBikeSensorFirmware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,21 @@ void setupSensors() {

PGASensorInfo sensor1;
sensor1.sck_pin =
(config.displayConfig & DisplaySwapSensors) ? SENSOR2_SCK_PIN : SENSOR1_SCK_PIN;
(config.displayConfig & DisplaySwapSensors) ? SENSOR1_SCK_PIN : SENSOR2_SCK_PIN;
sensor1.mosi_pin =
(config.displayConfig & DisplaySwapSensors) ? SENSOR2_MOSI_PIN : SENSOR1_MOSI_PIN;
(config.displayConfig & DisplaySwapSensors) ? SENSOR1_MOSI_PIN : SENSOR2_MOSI_PIN;
sensor1.miso_pin =
(config.displayConfig & DisplaySwapSensors) ? SENSOR2_MISO_PIN : SENSOR1_MISO_PIN;
(config.displayConfig & DisplaySwapSensors) ? SENSOR1_MISO_PIN : SENSOR2_MISO_PIN;
sensor1.sensorLocation = "Right";
sensorManager->registerSensor(sensor1, 0);

PGASensorInfo sensor2;
sensor2.sck_pin =
(config.displayConfig & DisplaySwapSensors) ? SENSOR1_SCK_PIN : SENSOR2_SCK_PIN;
(config.displayConfig & DisplaySwapSensors) ? SENSOR2_SCK_PIN : SENSOR1_SCK_PIN;
sensor2.mosi_pin =
(config.displayConfig & DisplaySwapSensors) ? SENSOR1_MOSI_PIN : SENSOR2_MOSI_PIN;
(config.displayConfig & DisplaySwapSensors) ? SENSOR2_MOSI_PIN : SENSOR1_MOSI_PIN;
sensor2.miso_pin =
(config.displayConfig & DisplaySwapSensors) ? SENSOR1_MISO_PIN : SENSOR2_MISO_PIN;
(config.displayConfig & DisplaySwapSensors) ? SENSOR2_MISO_PIN : SENSOR1_MISO_PIN;
sensor2.sensorLocation = "Left";
sensorManager->registerSensor(sensor2, 1);
#endif
Expand Down

0 comments on commit 292e14d

Please sign in to comment.