cubepilot / framework Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Currently, an array of 50 param pointers and keys are allocated whether or not they are used, using around 500 bytes of RAM. These lists could be dynamically allocated on setup.
Moving to C++ and using templates could help with this.
sizeof(struct can_tx_frame_s) is currently around 32 bytes. Reducing this will save significant amounts of RAM. A few ways:
reducing framework RAM usage:
In many places, during initialization, there is a check for a fault condition that just causes the function to return without reporting anything. This is potentially unsafe and there should be a common way to handle initialization faults.
Failure scenarios I can think of:
These sorts of issues can be prevented by ensuring that topics never run out of memory. See also #5
This allows static node id allocation via parameter to work on the bootloader.
This is both a safety and RAM recovery issue - if pubsub topic groups are running out of memory, that's not safe, but we don't want to waste memory unnecessarily.
this will allow for storage mechanisms other than flash, while keeping the same param frontend
This allows event-driven update of intermediate variables when parameters are changed.
Being able to shrink these could save significant RAM.
If a bootloader.bin file is present in the board configuration directory, create a combined bootloader+application binary file.
e.g.:
#include <modules/worker_thread/worker_thread.h>
WORKER_THREAD_DECLARE_EXTERN(spi3_thread)
static struct worker_thread_listener_task_s imu_delta_listener_task;
static void imu_deltas_handler(size_t msg_size, const void* buf, void* ctx);
RUN_AFTER(INIT_END) {
worker_thread_add_listener_task(&spi3_thread, &imu_delta_listener_task, &imu_deltas_topic, imu_deltas_handler, NULL);
}
static void imu_deltas_handler(size_t msg_size, const void* buf, void* ctx) {
const struct imu_delta_s* deltas = (const struct imu_delta_s*)buf;
// ...
}
should be more like:
WORKER_THREAD_LISTENER(spi3_thread, imu_deltas_topic) {
}
Or something more C++-y.
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.