Coder Social home page Coder Social logo

libparam's People

Contributors

alexandretessier avatar edvardxyz avatar fadeto404 avatar jeanbaptistelab avatar johandc avatar kivkiv12345 avatar laurabondeholst avatar lindharden avatar lykkeberg avatar mgraungaard avatar mmolga10 avatar negatratoron avatar rasmuswind avatar sandramartos avatar troelsjessen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

libparam's Issues

When using PARAM_DEFINE_* macros in C++, get "designator order does not match declaration order"

Compiler: g++ 11.3.0

Expected behavior: PARAM_DEFINE_* macros generate compiling C++ code.

Actual behavior: The compile fails with the error:

param.h:199:9: error: designator order for field ‘param_s::id’ does not match declaration order in ‘param_t’ {aka ‘param_s’}

This appears to be because in C++20, the order of designated initializers has to match the declaration order. See:

Note: out-of-order designated initialization, nested designated initialization, mixing of designated initializers and regular initializers, and designated initialization of arrays are all supported in the C programming language, but are not allowed in C++.

From https://en.cppreference.com/w/cpp/language/aggregate_initialization#Designated_initializers

It seems like this can be fixed just by re-ordering the initializers and inserting NULL initializers as needed in the PARAM_DEFINE_* macros.


Reproducible example: In a new project directory:

Clone libcsp into lib/csp and libparam into lib/param (as done here: https://github.com/spaceinventor/csh)

meson.build file:

project('TestProgram',
	'cpp',
	subproject_dir: 'lib'
)

csp_dep = dependency('csp', fallback: ['csp', 'csp_dep'], required: true)
param_dep = dependency('param', fallback: ['param', 'param_dep'], required: true)

main = executable(
	'main',
	[ 'src/main.cpp' ],
	dependencies: [csp_dep, param_dep]
)

src/main.cpp file:

#include <param/param.h>

static uint8_t _ch_on[12];
PARAM_DEFINE_REMOTE_DYNAMIC(20, ch_on, 3, PARAM_TYPE_UINT8, 12, 0, PM_CONF, &_ch_on, "");

int main() {
  return 0;
}

vmem_client_find does not properly support version 2

The function, vmem_client_find, takes as argument the version but the return type is strictly version 1. When using version 2 the result from vmem_client_list_get is vmem_list2_t but is casted to vmem_list_t causing the vaddr field to be truncated.

This discrepancy seems to have been implemented in vmem_client_list, so a similar fix would be appreciated here.

Let me know if you want us (DISCO2 software group at ITU) to make a pull request.

BAT-P3 List Of Parameters

Hello @johandc,
Where can I locate the list of valid parameters for the BAT-P3 module? I am just getting familiar with the part by reading its datasheet, and I see a list of parameters retrieved with /bin/bash on page 9. That list is titled, "Example telemetry using ‘satctl’ with CAN-dongle on a PC".

I want to get at the description of these parameters and ideally look over their implementation in the available libparam source so that I can identify the types of the arguments as well. If these descriptions are in some document somewhere, that would do as well. Thank you.
Nuertey

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.