Mise en forme

This commit is contained in:
=
2021-01-27 17:06:30 +01:00
parent 56e5041c5f
commit d755c5e0e4
9 changed files with 7 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
// ZenDrive Simulator firmware
// Copyright (c) 2021 - Valentin Boulanger
// Version : 1.0.0
// Version : 1.2.1
//--------------------------------------------------------------------
#include "ZenDrive.h"
@@ -30,8 +30,6 @@ const bool USE_GEARSHIFT = true;
const bool USE_PEDALS = true;
const bool USE_WHEEL = true;
const int INTERVAL = 15;
void setup() {
// Initialize sensors
pinMode(SPEEDS_PIN, INPUT);
@@ -54,7 +52,7 @@ void setup() {
pinMode(FOG_LIGHTS_PIN, INPUT_PULLUP);
// Set current states
/* Gearshift */
/* Gearshift module */
if(USE_GEARSHIFT){
int value = analogRead(SPEEDS_PIN);
if(value < 200) ZenDrive.switchSpeed1();
@@ -150,11 +148,11 @@ void loop() {
/* Steering wheel module */
if(USE_WHEEL){
// Blinkers
if(digitalRead(LEFT_BLINKER_PIN)){
if(!digitalRead(LEFT_BLINKER_PIN)){
ZenDrive.setBlinkerLeft(true);
ZenDrive.setBlinkerRight(false);
}
else if(digitalRead(RIGHT_BLINKER_PIN)){
else if(!digitalRead(RIGHT_BLINKER_PIN)){
ZenDrive.setBlinkerLeft(false);
ZenDrive.setBlinkerRight(true);
}

View File

@@ -4,7 +4,7 @@
Copyright (c) 2021, Valentin Boulanger
This library is a part of the ZenDrive simulator firmware.
Version : 1.0.0
Version : 1.3.2
*/
#include "ZenDrive.h"

View File

@@ -4,7 +4,7 @@
Copyright (c) 2021, Valentin Boulanger
This library is a part of the ZenDrive simulator firmware.
Version : 1.0.0
Version : 1.3.2
*/
#ifndef ZENDRIVE_h