Skip to content
Snippets Groups Projects

Implement Python module for wristband GPIO access

Merged trilader requested to merge trilader/firmware:feature/gpio-module into master

Does what it says on the tin. It will fix #31 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • trilader added 2 commits

    added 2 commits

    • bdcbbfc3 - feat(epicardium): Add (wristband) GPIO module
    • 32b64570 - feat(pycardium): Add (wristband) GPIO module

    Compare with previous version

  • rahix
  • rahix
  • rahix
  • rahix
  • rahix
  • Thank you very much! Very clean code and the Python facing API looks good, too. :thumbsup:

    The only nagging point I have is error values. Please return errno codes from all functions in case something goes wrong or invalid values are passed in. On the Python side, raise exceptions when such a value is returned. The easiest way is using

    int res = epic_foo();
    if (res < 0) {
            mp_raise_OSError(-res);
    }

    but you might want to use ValueError instead if an invalid argument was passed in (like a pin number which does not exist).

    Edited by rahix
  • trilader added 2 commits

    added 2 commits

    • 1f00d7be - feat(epicardium): Add (wristband) GPIO module
    • 6bf9a6fc - feat(pycardium): Add (wristband) GPIO module

    Compare with previous version

  • I've added documentation for epicardium and pycardium and implemented error handling on the pycardium side as well.

  • rahix
  • trilader added 1 commit

    added 1 commit

    • 25a54a83 - feat(pycardium): Add (wristband) GPIO module

    Compare with previous version

  • Looks good to me! Thanks for keeping our codebase clean.

    However, I'm only a bot - so a human will still have to approve this request.

  • rahix resolved all threads

    resolved all threads

  • Ok, one more thing: Please rebase on latest master, or tick the "Allow commits from members who can merge to the target branch" checkbox so I can do it for you. Then I will merge :)

  • trilader added 6 commits

    added 6 commits

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading