mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-01-09 12:13:39 +00:00
fixed warning (#2297)
This commit is contained in:
parent
fcc52e83de
commit
023cee2c3c
@ -124,8 +124,9 @@ standalone_application_api_t api = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
StandaloneView::StandaloneView(NavigationView& nav, uint8_t* app_image)
|
StandaloneView::StandaloneView(NavigationView& nav, uint8_t* app_image)
|
||||||
: nav_(nav), _app_image(app_image) {
|
: nav_(nav),
|
||||||
if (_app_image == nullptr) {
|
_app_image(*app_image) {
|
||||||
|
if (app_image == nullptr) {
|
||||||
chDbgPanic("Invalid application image");
|
chDbgPanic("Invalid application image");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,9 +54,9 @@ class StandaloneView : public View {
|
|||||||
private:
|
private:
|
||||||
bool initialized = false;
|
bool initialized = false;
|
||||||
NavigationView& nav_;
|
NavigationView& nav_;
|
||||||
uint8_t* _app_image;
|
uint8_t& _app_image;
|
||||||
standalone_application_information_t* get_application_information() const {
|
standalone_application_information_t* get_application_information() const {
|
||||||
return reinterpret_cast<standalone_application_information_t*>(_app_image);
|
return reinterpret_cast<standalone_application_information_t*>(&_app_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageHandlerRegistration message_handler_sample{
|
MessageHandlerRegistration message_handler_sample{
|
||||||
|
@ -69,7 +69,7 @@ std::vector<uint8_t> I2cDev_PPmod::downloadStandaloneApp(uint32_t index, size_t
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t data[3] = {(uint16_t)Command::COMMAND_APP_TRANSFER, index, offset / transfer_block_size};
|
uint16_t data[3] = {(uint16_t)Command::COMMAND_APP_TRANSFER, (uint16_t)index, (uint16_t)(offset / transfer_block_size)};
|
||||||
|
|
||||||
std::vector<uint8_t> ret(transfer_block_size);
|
std::vector<uint8_t> ret(transfer_block_size);
|
||||||
bool success = i2c_read((uint8_t*)&data, sizeof(data), (uint8_t*)ret.data(), transfer_block_size);
|
bool success = i2c_read((uint8_t*)&data, sizeof(data), (uint8_t*)ret.data(), transfer_block_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user