Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • F firmware
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 74
    • Issues 74
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 29
    • Merge requests 29
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • card10card10
  • firmware
  • Merge requests
  • !215

feat(epicardium): read card10.cfg

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged swym requested to merge swym/firmware:config into master Aug 23, 2019
  • Overview 25
  • Commits 7
  • Pipelines 7
  • Changes 7

Adds simple config parser along with config_ API that:

  • supports default values for options
  • allows typed querying of config values
  • types supported: boolean, integer, floating point and string

unknown options are ignored and LOG_WARNed on the console

So it seems I suck at writing parsers, the main loop is a little wonky but it works.

Tested:

  • int, bool, double option types
  • option.names.with.dots
  • whitespace all over the place
  • empty card10.cfg
Edited Aug 23, 2019 by swym
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: config