Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ADS1015 Faulhaber HTU21D_mod MS5837_potless Sensor_Head_RevB_3 USBDevice_dfu Utilsdfu beep
Fork of ARNSRS_testDFU by
Diff: main.cpp
- Revision:
- 81:83567a0ce82c
- Parent:
- 80:545af6e94aa5
- Child:
- 82:5a0589682877
diff -r 545af6e94aa5 -r 83567a0ce82c main.cpp
--- a/main.cpp Thu Jul 26 05:59:25 2018 +0000
+++ b/main.cpp Mon Aug 13 12:33:59 2018 +0000
@@ -134,9 +134,9 @@
float Volet_DeadBand = 5;
//Paramètre du PID
-float Kc = 80;
-float Ti = 0;
-float Td = 0;
+float Kc = 0.005;
+float Ti = 0.1;
+float Td = 0.0;
float RATE_PID = 10.0;
float Commande_PID;
int consigne = 210;
@@ -285,6 +285,11 @@
}
+void Alarm_IHM()
+{
+ IHM("<0/0/0 0-0-0 ;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;%d>\r\n", 6);
+ }
+
void Sleep_HIGH_WakeUp()
{
@@ -640,7 +645,13 @@
} else if (0 == strcmp(com, "res_ihm")) {
IHM("<0/0/0 0-0-0 ;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;%d>\r\n", 4);
} else if (0 == strcmp(com, "page_ihm")) {
- IHM("<0/0/0 0-0-0 ;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;%d>\r\n", 5);
+ IHM("<0/0/0 0-0-0 ;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;%d>\r\n", 5);
+ } else if (0 == strcmp(com, "alarm")) {
+ Commande_IHM = 6;
+ } else if (0 == strcmp(com, "alarm_fat")) {
+ Commande_IHM = 7;
+ } else if (0 == strcmp(com, "ack_alarm")) {
+ Commande_IHM = 8;
} else if (0 == strcmp(com, "arnsrs_id")) {
OUTPUT(" Changement de l'ID de l'appareil pour le N°: %s\r\n", numb);
//UTILS::Store_A_Val(atoi(numb), "ARNSRS_ID");
@@ -834,16 +845,20 @@
if (0 == strcmp(com, "USB")) {
OUTPUT(" Passage en Mode Transfert Flash To USB...\r\n");
FLAG_REC = false;
- //Mode_SECU();
+ Mode_SECU();
UTILS::UnMount_Flash();
UTILS::FLASH_set_boot_bank(2);
NVIC_SystemReset();
- } else if (0 == strcmp(com, "2")) {
-
- } else if (0 == strcmp(com, "3")) {
-
- } else {
-
+ } else if (0 == strcmp(com, "res_otu")) {
+ OTU = 0;
+ } else if (0 == strcmp(com, "cons")) {
+ consigne = atoi(numb);
+ control_Servo.setSetPoint(consigne);
+ OUTPUT(" MAJ CONSIGNE PID --> Consigne = %d\r\n", consigne);
+ } else if (0 == strcmp(com, "reset")) {
+ NVIC_SystemReset();
+ } else if (0 == strcmp(com, "sleep")) {
+ Stop_Sequence();
}
strcpy(IHM," ");
