Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
-mat- filid brandy
firmware
Commits
8b6240f0
Verified
Commit
8b6240f0
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
fix(docs): Minor fixes in display docs
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
c3bcca29
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Documentation/index.rst
+1
-1
1 addition, 1 deletion
Documentation/index.rst
epicardium/epicardium.h
+20
-13
20 additions, 13 deletions
epicardium/epicardium.h
pycardium/modules/py/display.py
+6
-6
6 additions, 6 deletions
pycardium/modules/py/display.py
with
27 additions
and
20 deletions
Documentation/index.rst
+
1
−
1
View file @
8b6240f0
...
...
@@ -22,9 +22,9 @@ Last but not least, if you want to start hacking the lower-level firmware, the
pycardium/overview
pycardium/color
pycardium/display
pycardium/leds
pycardium/vibra
pycardium/display
.. toctree::
:maxdepth: 1
...
...
This diff is collapsed.
Click to expand it.
epicardium/epicardium.h
+
20
−
13
View file @
8b6240f0
...
...
@@ -177,19 +177,19 @@ API(API_INTERRUPT_DISABLE, int epic_interrupt_disable(api_int_id_t int_id));
* =======
*/
/**
*
*/
/** Line-Style */
enum
linestyle_t
{
/** */
LINESTYLE_FULL
=
0
,
/** */
LINESTYLE_DOTTED
=
1
};
/**
*
*/
/** Fill-Style */
enum
fillstyle_t
{
/** */
FILLSTYLE_EMPTY
=
0
,
/** */
FILLSTYLE_FILLED
=
1
};
...
...
@@ -197,7 +197,8 @@ enum fillstyle_t {
* Locks the display.
*
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API
(
API_DISP_OPEN
,
int
epic_disp_open
());
...
...
@@ -205,7 +206,8 @@ API(API_DISP_OPEN, int epic_disp_open());
* Unlocks the display again.
*
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API
(
API_DISP_CLOSE
,
int
epic_disp_close
());
...
...
@@ -224,7 +226,8 @@ API(API_DISP_UPDATE, int epic_disp_update());
* :param fg: foreground color in rgb565
* :param bg: background color in rgb565
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API
(
API_DISP_PRINT
,
int
epic_disp_print
(
...
...
@@ -240,7 +243,8 @@ API(API_DISP_PRINT,
*
* :param color: fill color in rgb565
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API
(
API_DISP_CLEAR
,
int
epic_disp_clear
(
uint16_t
color
));
...
...
@@ -255,7 +259,8 @@ API(API_DISP_CLEAR, int epic_disp_clear(uint16_t color));
* :param linestyle: 0 for solid, 1 for dottet (almost no visual difference)
* :param pixelsize: thickness of the line; 1 <= pixelsize <= 8
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API
(
API_DISP_LINE
,
int
epic_disp_line
(
...
...
@@ -279,7 +284,8 @@ API(API_DISP_LINE,
* :param fillstyle: 0 for empty, 1 for filled
* :param pixelsize: thickness of the rectangle outline; 1 <= pixelsize <= 8
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API
(
API_DISP_RECT
,
int
epic_disp_rect
(
...
...
@@ -302,7 +308,8 @@ API(API_DISP_RECT,
* :param fillstyle: 0 for empty, 1 for filled
* :param pixelsize: thickness of the circle outline; 1 <= pixelsize <= 8
* :return: ``0`` on success or a negative value in case of an error:
* - ``-EBUSY``: Display was already locked from another task.
*
* - ``-EBUSY``: Display was already locked from another task.
*/
API
(
API_DISP_CIRC
,
int
epic_disp_circ
(
...
...
This diff is collapsed.
Click to expand it.
pycardium/modules/py/display.py
+
6
−
6
View file @
8b6240f0
...
...
@@ -7,9 +7,9 @@ class Display:
in card10 to be used in a safe way. All draw methods return
the display object so that it is possible to chain calls.
It is recommended to use a context manager as following:
.. code-block:: python
import display
with display.open() as disp:
disp.clear().update()
...
...
@@ -57,7 +57,7 @@ class Display:
def
print
(
self
,
text
,
*
,
fg
=
None
,
bg
=
None
,
posx
=
0
,
posy
=
0
):
"""
Prints a string on the display. Font size is locked to 20px
:param text: Text to print
:param fg: Foreground color (expects RGB triple)
:param bg: Background color (expects RGB triple)
...
...
@@ -80,8 +80,8 @@ class Display:
:param ye: Y end coordinate, 0 <= ye <= 80
:param col: color of the line (expects RGB triple)
:param dotted: whether the line should be dotted or not
(questionable implementation: draws every other pixel white, draws
white squares at higher pixel sizes)
(questionable implementation: draws every other pixel white, draws
white squares at higher pixel sizes)
:param size: size of the individual pixels, ranges from 1 to 8
"""
...
...
@@ -111,7 +111,7 @@ class Display:
def
circ
(
self
,
x
,
y
,
rad
,
*
,
col
=
None
,
filled
=
True
,
size
=
1
):
"""
Draws a circle on the display.
:param x: center x coordinate, 0 <= x <= 160
:param y: center y coordinate, 0 <= y <= 80
:param rad: radius
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment