Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed Binaries/OpenLog_Artemis-V10-v28_BETA.bin
Binary file not shown.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ v2.8:

* Corrects the serial token timestamp printing - resolves #192
* The charsReceived debug print ("Total chars received: ") now excludes the length of the timestamps
* Consistent use of File32/ExFile/FsFile/File. Don't use SdFile for temporary files

v2.7:
---------
Expand Down
1 change: 1 addition & 0 deletions Firmware/OpenLog_Artemis/OpenLog_Artemis.ino
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
v2.8:
Corrects the serial token timestamp printing - resolves #192
The charsReceived debug print ("Total chars received: ") now excludes the length of the timestamps
Consistent use of File32/ExFile/FsFile/File. Don't use SdFile for temporary files

*/

Expand Down
11 changes: 10 additions & 1 deletion Firmware/OpenLog_Artemis/logging.ino
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ void msg(const char * message)
//Updates EEPROM and then appends to the new log file.
char* findNextAvailableLog(int &newFileNumber, const char *fileLeader)
{
SdFile newFile; //This will contain the file for SD writing
//This will contain the file for SD writing
#if SD_FAT_TYPE == 1
File32 newFile;
#elif SD_FAT_TYPE == 2
ExFile newFile;
#elif SD_FAT_TYPE == 3
FsFile newFile;
#else // SD_FAT_TYPE == 0
File newFile;
#endif // SD_FAT_TYPE

if (newFileNumber < 2) //If the settings have been reset, let's warn the user that this could take a while!
{
Expand Down
13 changes: 11 additions & 2 deletions Firmware/OpenLog_Artemis/nvm.ino
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,19 @@ bool loadSystemSettingsFromFile()
{
if (sd.exists("OLA_settings.txt"))
{
SdFile settingsFile; //FAT32
#if SD_FAT_TYPE == 1
File32 settingsFile;
#elif SD_FAT_TYPE == 2
ExFile settingsFile;
#elif SD_FAT_TYPE == 3
FsFile settingsFile;
#else // SD_FAT_TYPE == 0
File settingsFile;
#endif // SD_FAT_TYPE

if (settingsFile.open("OLA_settings.txt", O_READ) == false)
{
SerialPrintln(F("Failed to open settings file"));
SerialPrintln(F("Failed to open device settings file"));
return (false);
}

Expand Down
11 changes: 10 additions & 1 deletion Firmware/OpenLog_Artemis/productionTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,16 @@ void productionTest()
if (sd.exists("OLA_prod_test.txt"))
sd.remove("OLA_prod_test.txt");

SdFile testFile; //FAT32
#if SD_FAT_TYPE == 1
File32 testFile;
#elif SD_FAT_TYPE == 2
ExFile testFile;
#elif SD_FAT_TYPE == 3
FsFile testFile;
#else // SD_FAT_TYPE == 0
File testFile;
#endif // SD_FAT_TYPE

if (testFile.open("OLA_prod_test.txt", O_CREAT | O_APPEND | O_WRITE) == true)
{
#ifdef verboseProdTest
Expand Down
2 changes: 1 addition & 1 deletion Firmware/OpenLog_Artemis/zmodem.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ _PROTOTYPE(void bibi , (int n ));
_PROTOTYPE(int wcs , (const char *oname));
_PROTOTYPE(void saybibi, (void));

int wctxpn(char *name,SdFile *file);
int wctxpn(char *name);
int wcrx();

/* Ward Christensen / CP/M parameters - Don't change these! */
Expand Down
26 changes: 22 additions & 4 deletions Firmware/OpenLog_Artemis/zmodem.ino
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,15 @@ V2.00
extern int Filesleft;
extern long Totalleft;

extern SdFile fout;
#if SD_FAT_TYPE == 1
extern File32 fout;
#elif SD_FAT_TYPE == 2
extern ExFile fout;
#elif SD_FAT_TYPE == 3
extern FsFile fout;
#else // SD_FAT_TYPE == 0
extern File fout;
#endif // SD_FAT_TYPE

static bool oneTime = false; // Display the Tera Term Change Directory note only once (so it does not get on people's nerves!)

Expand Down Expand Up @@ -171,9 +179,19 @@ void sdCardHelp(void)
DSERIALprint(F("\r\n"));
}

SdFile root; // Copied from SdFat OpenNext example
SdFile fout;
//dir_t *dir ;
#if SD_FAT_TYPE == 1
File32 root;
File32 fout;
#elif SD_FAT_TYPE == 2
ExFile root;
ExFile fout;
#elif SD_FAT_TYPE == 3
FsFile root;
FsFile fout;
#else // SD_FAT_TYPE == 0
File root;
File fout;
#endif // SD_FAT_TYPE

int count_files(int *file_count, long *byte_count)
{
Expand Down
10 changes: 9 additions & 1 deletion Firmware/OpenLog_Artemis/zmodem_rz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,15 @@ _PROTOTYPE(void bttyout , (int c ));
#ifndef ARDUINO
FILE *fout;
#else
extern SdFile fout;
#if SD_FAT_TYPE == 1
extern File32 fout;
#elif SD_FAT_TYPE == 2
extern ExFile fout;
#elif SD_FAT_TYPE == 3
extern FsFile fout;
#else // SD_FAT_TYPE == 0
extern File fout;
#endif // SD_FAT_TYPE
#endif

// Dylan (monte_carlo_ecm, bitflipper, etc.) - Moved this to a global variable to enable
Expand Down
10 changes: 9 additions & 1 deletion Firmware/OpenLog_Artemis/zmodem_sz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,15 @@ _PROTOTYPE(int zsendcmd , (char *buf , int blen ));
#ifndef ARDUINO
FILE *fout;
#else
extern SdFile fout;
#if SD_FAT_TYPE == 1
extern File32 fout;
#elif SD_FAT_TYPE == 2
extern ExFile fout;
#elif SD_FAT_TYPE == 3
extern FsFile fout;
#else // SD_FAT_TYPE == 0
extern File fout;
#endif // SD_FAT_TYPE
#endif

int wcs(const char *oname)
Expand Down