41
41
user_text buffer text size same now.. Need to clean up code for humans..
42
42
20231120 CLI_V1.0 Required to make a complete program - this file, CLI_V1.0,Quest_CLI.h, Quest_Flight.h,Quest_flight.cpp
43
43
cmd_takeSphot , cmd_takeSpiphoto, nophotophoto, nophoto30K --,clean up code for understanding.
44
-
44
+ 20231207 CLI_V1.1 Required to make a complete program - this file, CLI_V1.1,Quest_CLI.h, Quest_Flight.h,Quest_flight.cpp
45
+ Fixed Bug of crrupted file names when being uploaded to the McMek. added terminal countdown for the "T"
46
+ command during startup. Only affected file is CLI.V1.1 all other files
47
+ do not need to change...Flight or libraries...
45
48
* *****************************************************************************
46
49
*/
47
50
//
48
- int Qversion = 20230715 ; // Program version
51
+ char Qversion [] = " CLI_V1.1 " ; // Program version
49
52
const char compile_date[] = __DATE__ " " __TIME__;
50
53
const char source_file[] = __FILE__;
51
-
54
+ //
52
55
// -----includes--------------------
53
56
#include < Wire.h>
54
57
#include < i2cdetect.h>
@@ -634,9 +637,9 @@ void setup() {
634
637
//
635
638
//
636
639
Serial.println (" \r\n\n ----------------------------------------------------------" );
637
- Serial.println (" \n System Startup - S3_40 Testing Command line interface 20220710 " );
640
+ Serial.println (" \n System Startup - S3_40 Testing Command line interface CLI_V1.1 " );
638
641
Serial.println (" interface not complete, look for future cleaner updates, Thank you!" );
639
- Serial.println (" add to change this is your playground to learn the S3_40 system\n " );
642
+ Serial.println (" add to change this is your flight playground to learn the S3_40 system\n " );
640
643
//
641
644
// ------------ set digital IO to output and high ------------
642
645
pinMode (IO7, OUTPUT); //
@@ -709,31 +712,7 @@ void setup() {
709
712
Serial.println (" SD installed OK" );
710
713
initSD (); // set up SD files and system files for operation
711
714
//
712
- /*
713
- //----------------------------------------------------------------------
714
- //-------- Check for Cumulitive Mission Time file if no exist Create it
715
- //
716
- File CumMisClk = SD.open("CumMisClk.txt"); //name of file
717
- if (CumMisClk){
718
- Serial.println("CumMisClk file exist");
719
- }
720
- else{
721
- Serial.println("Made CumMisClk file");
722
- FsDateTime::setCallback(dateTime); //set time and date for file
723
- File CumMisClk = SD.open("CumMisClk.txt", FILE_WRITE);
724
- str=String(1);
725
- Serial.println(str);
726
- str.toCharArray(text_buf,11);
727
- CumMisClk.print(text_buf);
728
-
729
- }
730
- CumMisClk.close();
731
- //
732
- Serial.println("CumMisClk.tct written");
733
- */
734
715
// ----------------------------------------------------------------------
735
- //
736
- //
737
716
// ----------- System test flages ---------------------------------------
738
717
//
739
718
testing = false ; // reset active command line processing flag
@@ -755,13 +734,12 @@ void loop() {
755
734
Serial.println ();
756
735
Serial.print (" Free Memory = " ); Serial.print (freeMemory (), HEX);
757
736
Serial.print (" HEX or " ); Serial.print (freeMemory ()); Serial.println (" DEC" );
758
- cmd_stackandheap ();
759
737
//
760
-
761
738
Serial.println (" \r\n\n Input 'T' to enter test within 15 seconds" );
762
739
//
763
740
uint32_t currentMillis = millis (); // this is time now
764
-
741
+ uint16_t countdown = 15 ; // tet countdown clock
742
+ long unsigned int milliscountdown = millis (); // countdown counter for test
765
743
// ??????????????????????????????????????????????????????????????????????????????????????????????????????
766
744
// test for Flying(); //Set Flying active and go to flight programming
767
745
// ??????????????????????????????????????????????????????????????????????????????????????????????????????
@@ -776,6 +754,11 @@ void loop() {
776
754
SoftwareReset ();
777
755
}
778
756
}
757
+ if (millis () - milliscountdown > 1000 ){ // count every second in waiting for test
758
+ milliscountdown = millis ();
759
+ countdown--; // decrease count for test
760
+ Serial.print (" Enter 'T' for test else enter flying Wait time = " ); Serial.print (countdown); Serial.print (" version = " );Serial.println (Qversion);
761
+ }
779
762
}
780
763
if (testing == true ) {
781
764
SoftwareReset ();
@@ -2350,8 +2333,9 @@ void Hostinterupt() {
2350
2333
uint16_t retval; // meke return error test reg
2351
2334
retval = getFilefromQue (args[1 ]); // get the file name in args[1]
2352
2335
if (retval == 0 ) { // returned value ==0, got a regonized name
2353
- // Serial.print("got filename:"); //sayso
2354
- // Serial.println(args[1]); //print out the name
2336
+ // Serial.print("got filename:"); //sayso
2337
+ // Serial.println(args[1]); //print out the name
2338
+ Chardelay (); // delay to let master to recover
2355
2339
} else {
2356
2340
Serial.println (" err: got no filename" ); // error does not know file
2357
2341
EIC->INTFLAG .reg = EIC_INTFLAG_EXTINT (0 ); // abort reset the IRQ Flag
0 commit comments