Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
flow3r
flow3r firmware
Commits
12f478a8
Commit
12f478a8
authored
1 year ago
by
dx
Committed by
q3k
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
display: cleanup, reformat, remove unused stuff
parent
2ea31d35
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/badge23/display.c
+8
-66
8 additions, 66 deletions
components/badge23/display.c
components/badge23/include/badge23/display.h
+0
-1
0 additions, 1 deletion
components/badge23/include/badge23/display.h
with
8 additions
and
67 deletions
components/badge23/display.c
+
8
−
66
View file @
12f478a8
...
...
@@ -10,56 +10,24 @@
#include
<string.h>
#include
<math.h>
#include
"badge23/scope.h"
#include
"esp_system.h"
#include
"../../usermodule/uctx/uctx/ctx.h"
volatile
Ctx
*
the_ctx
=
NULL
;
uint16_t
*
pixels
;
typedef
struct
leds_cfg
{
bool
active_paddles
[
10
];
}
display_cfg_t
;
static
QueueHandle_t
display_queue
=
NULL
;
static
void
display_task
(
TimerHandle_t
aaaaa
);
//static void display_task(void* arg);
static
void
_display_init
()
{
GC9A01_Init
();
// GC9A01_Screen_Load(0,0,240,240,pixels);
GC9A01_Update
();
/*
display_queue = xQueueCreate(1, sizeof(display_cfg_t));
TaskHandle_t handle;
xTaskCreate(&display_task, "Display", 4096, NULL, configMAX_PRIORITIES - 3, &handle);
*/
/* SCOPE TASK
TimerHandle_t aa = xTimerCreate("Display", pdMS_TO_TICKS(100), pdTRUE, (void *) 0, *display_task);
if( xTimerStart(aa, 0 ) != pdPASS )
{
}
*/
}
void
display_ctx_init
()
{
the_ctx
=
ctx_new_for_framebuffer
(
the_ctx
=
ctx_new_for_framebuffer
(
ScreenBuff
,
GC9A01_Width
,
GC9A01_Height
,
GC9A01_Width
*
2
,
CTX_FORMAT_RGB565_BYTESWAPPED
);
// rotate by 180 deg and translate x and y by 120 px to have (0,0) at the center of the screen
ctx_apply_transform
(
the_ctx
,
-
1
,
0
,
120
,
0
,
-
1
,
120
,
0
,
0
,
1
);
// rotate by 180 deg and translate x and y by 120 px to have (0,0) at the center of the screen
ctx_apply_transform
(
the_ctx
,
-
1
,
0
,
120
,
0
,
-
1
,
120
,
0
,
0
,
1
);
}
void
display_update
(){
...
...
@@ -78,35 +46,9 @@ void display_fill(uint16_t col){
GC9A01_FillRect
(
0
,
0
,
240
,
240
,
col
);
}
void
display_draw_scope
(){
//display_cfg_t display_;
uint16_t
line
[
240
];
/*
printf("waiting...\n");
xQueueReceive(display_queue, &display_, portMAX_DELAY);
printf("go...\n");
*/
//uint32_t t0 = esp_log_timestamp();
begin_scope_read
();
for
(
int
y
=
0
;
y
<
240
;
y
++
){
read_line_from_scope
(
&
(
line
[
0
]),
y
);
memcpy
(
&
ScreenBuff
[
y
*
240
],
line
,
sizeof
(
line
));
}
end_scope_read
();
//uint32_t td = esp_log_timestamp() - t0;
// printf("it took %lu\n", td);
display_update
();
}
//static void display_task(void* arg) {
static
void
display_task
(
TimerHandle_t
aaaaa
)
{
display_draw_scope
();
}
void
display_init
()
{
_display_init
();
display_ctx_init
();
void
display_init
()
{
GC9A01_Init
();
GC9A01_Update
();
display_ctx_init
();
}
This diff is collapsed.
Click to expand it.
components/badge23/include/badge23/display.h
+
0
−
1
View file @
12f478a8
...
...
@@ -6,7 +6,6 @@
void
display_init
();
void
display_ctx_init
();
void
display_draw_scope
();
void
display_update
();
void
display_draw_pixel
(
uint8_t
x
,
uint8_t
y
,
uint16_t
col
);
uint16_t
display_get_pixel
(
uint8_t
x
,
uint8_t
y
);
...
...
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