From b72dd738d2f073bb6a22f650bf367ac59b8ef3b6 Mon Sep 17 00:00:00 2001 From: medina5 Date: Wed, 3 Dec 2025 23:27:56 +0100 Subject: [PATCH] Warning --- AutomForArduino.cpp | 6 +++--- main.cpp | 8 ++++---- main.h => main.hpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) rename main.h => main.hpp (97%) diff --git a/AutomForArduino.cpp b/AutomForArduino.cpp index 77fb935..bf2183d 100644 --- a/AutomForArduino.cpp +++ b/AutomForArduino.cpp @@ -81,7 +81,7 @@ void pinMode(unsigned char p, unsigned char mode) typedef struct { - char input; + int input; int vKey; } KeyboardIO; @@ -342,7 +342,7 @@ double analogRead(int p) void digitalWrite(unsigned int p, int value) { - if (p < 0 || p > 255) + if (p > 255) { printf("Pin %d is out of Range.", p); return; @@ -386,7 +386,7 @@ void digitalWrite(unsigned int p, int value) void analogWrite(unsigned int p, double value) { - if (p < 0 || p > 31) + if (p > 31) { printf("Pin %d is out of Range.", p); return; diff --git a/main.cpp b/main.cpp index 78c79fc..8d2cade 100644 --- a/main.cpp +++ b/main.cpp @@ -3,7 +3,7 @@ #include #include #include -#include "main.h" +#include "main.hpp" #include "AutomForArduino.cpp" #include @@ -41,7 +41,7 @@ Gauge* debit_entree = nullptr; Gauge* debit_sortie = nullptr; // ************************************************************ -int main(int argc, char *argv[]) +int main() { /* Initialisation */ ConsoleInit(); @@ -562,7 +562,7 @@ void Process() _digital[IN_SENSOR_HIGH].ivalue = test; } - Affichage(t); + Affichage(); t_backup = t; } @@ -694,7 +694,7 @@ void AffichageWindow() wrefresh(window); } -void Affichage(unsigned long t) +void Affichage() { mvwprintw(window, 1, 50, "%5.1f s", t_elapsed); diff --git a/main.h b/main.hpp similarity index 97% rename from main.h rename to main.hpp index 56df0db..73a7cdc 100644 --- a/main.h +++ b/main.hpp @@ -20,7 +20,7 @@ double SimulConsoSinusoidale(long t); double SimulConsoBrown(double valeur_precedente); void AffichageWindow(); -void Affichage(unsigned long t); +void Affichage(); void AffichageGraphe(int y, int x, double value); // KEYBOARD INPUT