Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

psmithcrl
Copy link
Contributor

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.

@QuentinTorg
Copy link
Collaborator

Does it make sense to remove this outdated flash utility at the same time? https://github.com/carnegierobotics/LibMultiSense/tree/master/source/Utilities/FlashUtility

@dougbalish1
Copy link
Contributor

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
My $0.02: Looks like it's been disabled on the camera side since 2020. I'm assuming we left it in for legacy cameras, but probably worth taking out at this point.
If we're gonna do that though, might as well trash the flash ops as a whole, might be worth splitting out into its own PR

@dougbalish1
Copy link
Contributor

#164 first

int main(int argc, char *argv[]) {

char IpAddress[INET_ADDRSTRLEN] = {};
char FilePath[PATH_MAX] = {};
Copy link
Contributor

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)
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this print necessary?

Comment on lines +98 to +111
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);
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants