-
Notifications
You must be signed in to change notification settings - Fork 61
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
USB Protection Improvement and ExamMode Fix #111
USB Protection Improvement and ExamMode Fix #111
Conversation
…BLING THE PROTECTION** ⚠⚠ in order to fix epsilon_ flash (very dangerous thing !!)
|
#if ION_SIMULATOR_FILES | ||
mode = GlobalPreferences::ExamMode::Off; | ||
#else |
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.
I think these lines should be removed, because this pull request is marked as ready for review
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.
I don't know because it add the possibility to disable the exam mode in the simulator without rebooting
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.
Yes, but it is marked as ready to merge…
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.
Indeed because I think it can be a good idea to add the possibility to disable the exam mode in simulators ^^ The exam mode in simulator doesn't make any sense in the first place because you can always leave the simulator and open others app so I don't see the problem by adding the option
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.
Yes, but if we look #131, it is built as a simulator, but it runs on the calculator…
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.
Yes, I agree with Yaya-Cout
apps/shared/function.h
Outdated
@@ -78,6 +78,7 @@ class Function : public ExpressionModelHandle { | |||
} | |||
bool isActive() const { return m_active; } | |||
void setActive(bool active) { m_active = active; } | |||
void setMyColor(KDColor color) {m_color = color; } |
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.
void setMyColor(KDColor color) {m_color = color; } | |
void setMyColor(KDColor color) { m_color = color; } |
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.
In fact, is it possible to give a better name to the function?
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.
setGraphColor ?
ion/src/device/shared/boot/rt0.cpp
Outdated
@@ -245,7 +245,7 @@ void __attribute__((noinline)) start() { | |||
Ion::Device::Board::initFPU(); | |||
|
|||
/* Call static C++ object constructors | |||
* The C++ compiler creates an initialization function for each static object. | |||
* The C++ compiler creates an initialization function for each static object. |
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.
* The C++ compiler creates an initialization function for each static object. | |
* The C++ compiler creates an initialization function for each static object. |
@@ -78,6 +78,7 @@ void DFUInterface::wholeDataSentCallback(SetupPacket *request, uint8_t *transfer | |||
// Leave DFU routine: Leave DFU, reset device, jump to application code | |||
leaveDFUAndReset(); | |||
} else if (m_state == State::dfuDNBUSY) { | |||
m_state = State::dfuDNBUSY; |
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.
I don't understand this line...
@@ -188,7 +189,7 @@ void DFUInterface::changeAddressPointerIfNeeded() { | |||
|
|||
void DFUInterface::eraseCommand(uint8_t *transferBuffer, uint16_t transferBufferLength) { | |||
/* We determine whether the commands asks for a mass erase or which sector to | |||
* erase. The erase must be done after the next getStatus request. */ | |||
* erase. The erase must be done after the next getStatus request. */ |
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.
?
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.
I think it has been squashed when merging, but this fork isn't up-to-date, so it isn't corrected in this repo
@@ -152,7 +153,7 @@ bool DFUInterface::processUploadRequest(SetupPacket *request, uint8_t *transferB | |||
} else { | |||
/* We decided to never protect Read operation. Else we would have to check | |||
* here it is not protected before reading. */ | |||
|
|||
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.
?
|
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 you fetch upstream, and test with the trash ?
// #if ION_SIMULATOR_FILES | ||
// mode = GlobalPreferences::ExamMode::Off; | ||
// #else | ||
mode = GlobalPreferences::sharedGlobalPreferences()->examMode(); | ||
// #endif |
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.
I think these comments can be removed.
@@ -217,7 +216,7 @@ void DFUInterface::eraseMemoryIfNeeded() { | |||
if (m_erasePage < 0) { | |||
return; | |||
} | |||
|
|||
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.
Remove trailing space…
I think this pull request have to be updated, because #205 remove the USB protection… |
I close this pull request because it's too outdated to be merged, a completed rework needs to be made |
Some little improvements preparing the release