OpenPilot

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
That is great Sam well done. Thanks for persisting.

That is great Sam well done. Thanks for persisting.

OP-1792 Makefile tidy: test commit for windows. Don't use target path

Merge branch 'filnet/OP-1797_improve_gcs_workspace_layout_reactivity' into next

Merge branch 'filnet/OP_1798_gcs_ophid_is_too_verbose' into next

Added a fix for bamboo build. Those 3 commits will be stashed before being merged to next.

Added a fix for bamboo build.
Those 3 commits will be stashed before being merged to next.

OP-1804: Fix bamboo compile errors.

The impact is insignificant (1.7% of memory free gained) in my test (small script). The heap allocated during the test is about 3K. It is safer to disable the free of the unused realloc'ed area. I ...

The impact is insignificant (1.7% of memory free gained) in my test (small script).
The heap allocated during the test is about 3K.
It is safer to disable the free of the unused realloc'ed area.
I have added a define around it in the next changeset.
The same test will be run later once we have a real script that does actually something.

fixed in next changeset

fixed in next changeset

OP-1804: Update realloc according to review.

yes I think it is good idea to not allow for realloc when lua is not enabled. I will add a CONFIG_REALLOC_SUPPORT so we can only enable this for a specific target (the one supporting Lua).

yes I think it is good idea to not allow for realloc when lua is not enabled. I will add a CONFIG_REALLOC_SUPPORT so we can only enable this for a specific target (the one supporting Lua).

I'm a bit concerned by this lua behaviour but that is not strictly related to this review. On the other hand wouldn't be better to make realloc a "nop" if requested size <= current size? This would...

I'm a bit concerned by this lua behaviour but that is not strictly related to this review.
On the other hand wouldn't be better to make realloc a "nop" if requested size <= current size?
This would reduce a lot risks of memory fragmentation and chances of long run stability issues.

add the deprecated attribute __attribute__ ((deprecated)) in the parameter list, as done in the rest of flight code.

add the deprecated attribute

__attribute__ ((deprecated))

in the parameter list, as done in the rest of flight code.

I would rather trigger an assert if the software is trying to use realloc on a system that is not supposed to support it. Memory leakage is not really an option.

I would rather trigger an assert if the software is trying to use realloc on a system that is not supposed to support it. Memory leakage is not really an option.

Merge branch 'next' into rvonlehe/OP-1740_UAV0_GetSetFunctionsTakeEnum

OP-1740 UAVO_GetSetFunctionsTakeEnum - getting started

    • -2
    • +0
    /ground/uavobjgenerator/uavobjectparser.h
Sounds like a good idea

Sounds like a good idea

more

    • -0
    • +49
    /ground/openpilotgcs/openpilotgcs.pri
    • -14
    • +1
    /ground/openpilotgcs/share/copydata.pro
I suggest to store all the stashed objects in a small struct. I did something similar in sixpointcalibrationmodel.h : typedef struct { UAVObject::Metadata accelStateMetadata; U...

I suggest to store all the stashed objects in a small struct.
I did something similar in sixpointcalibrationmodel.h :

    typedef struct {
        UAVObject::Metadata accelStateMetadata;
        UAVObject::Metadata magSensorMetadata;
        UAVObject::Metadata auxMagSensorMetadata;
        AuxMagSettings::DataFields    auxMagSettings;
        RevoCalibration::DataFields   revoCalibrationData;
        AccelGyroSettings::DataFields accelGyroSettingsData;
    } Memento;


See http://en.wikipedia.org/wiki/Memento_pattern

Lua is a big fan of realloc. This feature is required for lua. Tested with simple lua script on revo. Since lua is not in yet, pushing this change is armless since nobody else is using it. But si...

Lua is a big fan of realloc.
This feature is required for lua.

Tested with simple lua script on revo.
Since lua is not in yet, pushing this change is armless since nobody else is using it.

But since this is not tied to lua, I have decided to put it in earlier to get some feedback.

I have tested with heap check level3 that checks the integrity of the entire heap every (re)alloc.

OP-1804: Add realloc.
OP-1804: Add realloc.
OP-1804: Add realloc.