Skip to content

Commit 79168e6

Browse files
resolve merge conflict
2 parents 5ec23cf + ca2f149 commit 79168e6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Firmata.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ void FirmataClass::setFirmwareNameAndVersion(const char *name, byte major, byte
120120

121121
// parse out ".cpp" and "applet/" that comes from using __FILE__
122122
extension = strstr(name, ".cpp");
123-
filename = strrchr(name, '/') + 1; //points to slash, +1 gets to start of filename
123+
if (strrchr(name, '/') != NULL)
124+
filename = strrchr(name, '/') + 1; //points to slash, +1 gets to start of filename
125+
else
126+
filename = strrchr(name, '\\') + 1; //points to slash, +1 gets to start of filename
124127
// add two bytes for version numbers
125128
if(extension && filename) {
126129
firmwareVersionCount = extension - filename + 2;

Firmata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class FirmataClass
117117
void detach(byte command);
118118

119119
private:
120-
Stream &FirmataSerial;
120+
Stream &FirmataSerial;
121121
/* firmware name and version */
122122
byte firmwareVersionCount;
123123
byte *firmwareVersionVector;

0 commit comments

Comments
 (0)