-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firmware updater which provides Firmware update progress #159
base: master
Are you sure you want to change the base?
Conversation
…to psmithcrl/FirmwareUpdateProgress
Does it make sense to remove this outdated flash utility at the same time? https://github.com/carnegierobotics/LibMultiSense/tree/master/source/Utilities/FlashUtility |
@QuentinTorg |
#164 first |
int main(int argc, char *argv[]) { | ||
|
||
char IpAddress[INET_ADDRSTRLEN] = {}; | ||
char FilePath[PATH_MAX] = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use a std::string
here?
|
||
} | ||
|
||
int Ip::Setup(const char * _IpAddress) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just use std::string
instead of the c alternative?
sent = Send((uint8_t*)&Block, sizeof(Block)); | ||
if (sent!=sizeof(Block)) | ||
{ | ||
std::cerr << "RUNT Sent Expected " << l << " Got " << sent << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we clean up this print?
} | ||
crc32_final = crc32_initial; | ||
|
||
std::cout << "CRC32 0x" << std::hex << crc32_final << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this print necessary?
if (!FilePath) | ||
{ | ||
std::cerr << "Invalid File\n"; | ||
return -1; | ||
} | ||
|
||
int fd = open(FilePath, O_RDONLY|O_SYNC); | ||
if (fd < 0){ | ||
std::cerr << "Failed to open file!\n"; | ||
return -1; | ||
} | ||
|
||
uint32_t FileSize = lseek(fd, 0L, SEEK_END); | ||
lseek(fd, 0L, SEEK_SET); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you use a std::ifstream
here?
Please test this out and provide some feedback.
This will bind to a server process running on the camera.
Will update to include which firmware versions are compatible with this update process.