luxonis / depthai-bootloader-shared Goto Github PK
View Code? Open in Web Editor NEWShared code and data for depthai-bootloader
Home Page: https://docs.luxonis.com/
License: MIT License
Shared code and data for depthai-bootloader
Home Page: https://docs.luxonis.com/
License: MIT License
Three classes within dai::Response:*
have a success
member that is later directly tested in branching like if(resp.success) ...
However, there are multiple codepaths in which success
is never initialized and therefore holds a random garbage value.
Which then leads to failures in branching.
Easy fix. The classes should set a default init of 0
aka false.
main
and depthai-core
mainFound during code cleanup I'm in process doing. Here is one example...
The branch which tests if(resp.success)
https://github.com/luxonis/depthai-core/blob/c49cd08cb1cad7d526ca2c2a2b561f0dcfa7020d/src/device/DeviceBootloader.cpp#L691
Response::GetBootloaderConfig resp; // doesn't initialize anything to any value
receiveResponse(resp); // fail on first line of func and returns `false`
if(resp.success) { // therefore `success` was never initialized and if() tests random garbage value
Initialize all member fields. https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c41-a-constructor-should-create-a-fully-initialized-object
I have a PR forthcoming, fix for this specific case is easy.
The develop
branch is several months behind main
.
Should I submit my PR to the old develop
or the current main
or ??
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.