FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


addingvarembdgui

This is an old revision of the document!


Adding a new embedded variable to the Plan 3.0 GUI

This page was written on February 6th 2019. A lot of what will be described before is confusing, and/or plain wrong… but functional. Until we rework this part of the code this documentation will help you add variables.

1. Add variable to Device Spec in embedded project

fx-rigid-mn

  1. Open flexsea-system/src/flexsea_device_spec.c
  2. If needed, add a header to the file that contains your new variable
  3. Add label(s) to _rigid_mn_fieldlabels[]
  4. Add format(s) to _rigid_mn_field_formats[]
  5. Add pointer(s) to _rigid_mn_field_pointers[]
  6. Open flexsea_device_spec_defs.h (local file, not in submodule)
  7. Adjust the number of fields (_rigid_mn_numFields)
  8. Clean and build the project, do a quick local test if needed
  9. Commit & push your flexsea-system submodule
  10. Move to Section 2

fx-rigid-m7

Part that makes sense:

  1. Open flexsea_device_spec_m7.c
  2. If needed, add a header to the file that contains your new variable
  3. Add label(s) to _rigid_m7_fieldlabels[] (optional, doesn't get used)
  4. Add format(s) to _rigid_m7_field_formats[]
  5. Add pointer(s) to _rigid_m7_field_pointers[]
  6. Open flexsea_device_spec_defs.h
  7. Adjust the number of fields (_rigid_m7_numFields)
  8. Clean and build the project, do a quick local test if needed

Part that shouldn't exist:

  1. Open the FlexSEA-Stack-SharedLib project
  2. Repeat the label, format and pointer changes in the _mn_ arrays. Be mindful of the consequences of doing this…
  3. Open flexsea_device_spec_defs.h
  4. Adjust the number of fields (_rigid_mn_numFields & _rigid_m7_numFields). As long as it is higher than the real number it seems OK.

2. Update FlexSEA-Stack-SharedLib

  1. Pull latest submodule(s) in FlexSEA-Stack-SharedLib. Only flexsea-system should matter for the exercise at hand.
  2. Open the FlexSEA-Stack-SharedLib project and make sure that everything looks good. You can compile it with Eclipse, or with CMake.
  3. Compile code and make sure that a new static library is available (libFlexSEA-Stack-Plan.a)
  4. Commit & push if needed

3. Update fx_plan_stack

  1. Copy libFlexSEA-Stack-Plan.a from FlexSEA-Stack-SharedLib to plan_3_0\fx_plan_stack\lib
  2. Build with the tool you prefer. I typically do this in Qt.

4. Update Plan 3.0 GUI

A clean build of the GUI is all you need for your variable to be available in the Device Window, 2DPlot, and log.

Notes:

  • flexseastack/fx_device_defs.h has #define related to those variables. While they are used in the 2dPlot, I don't think adding new ones there is required…
addingvarembdgui.1549553468.txt.gz · Last modified: 2019/02/07 15:31 by flabelle