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

Adjust max_size for lispUpload #397

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions codeloader.cpp
Original file line number Diff line number Diff line change
@@ -299,11 +299,11 @@ bool CodeLoader::lispUpload(VByteArray vb)
data.append(vb);

// The ESP32 partition table has 512k space for lisp scripts. The STM32
// has one 128k flash page.
// has one 128k flash page. Subtract 6 bytes for fw size and crc.
auto fwParams = mVesc->getLastFwRxParams();
int max_size = 1024 * 500;
int max_size = 1024 * 512 - 6;
if (fwParams.hwType == HW_TYPE_VESC) {
max_size = 1024 * 120;
max_size = 1024 * 128 - 6;
}

if (data.size() > max_size) {