Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Kroužek
safe-soldering-station
Commits
15dc90b7
Commit
15dc90b7
authored
Jun 19, 2016
by
Martin Vítek
Browse files
Add base of rendering
parent
a11e0b3d
Changes
5
Hide whitespace changes
Inline
Side-by-side
SW/ADC.h
View file @
15dc90b7
...
...
@@ -115,6 +115,8 @@ class ADC
void
convert_adc_values
()
{
results
[
SUPPLY_VOLTAGE
]
=
244UL
*
(
uint32_t
)
adc_results
[
SUPPLY_VOLTAGE
]
*
28UL
/
1079UL
/
10UL
;
//results[SUPPLY_VOLTAGE] = 244UL * (uint32_t)adc_results[SUPPLY_VOLTAGE] * 28UL / 1079UL / 10UL;
results
[
SUPPLY_VOLTAGE
]
=
244UL
*
(
uint32_t
)(
adc_results
[
SUPPLY_VOLTAGE
]
-
200
)
*
28UL
/
10000UL
;
}
};
SW/CMakeLists.txt
View file @
15dc90b7
...
...
@@ -47,6 +47,8 @@ set(SOURCE_FILES
Uart.h
Backlight.h
ADC.h
Render.cpp
Render.h
)
add_avr_executable
(
safe-soldering-station
${
SOURCE_FILES
}
)
SW/Render.cpp
0 → 100644
View file @
15dc90b7
#include
"Render.h"
SW/Render.h
0 → 100644
View file @
15dc90b7
#pragma once
#define MAX_LENGHT 15
#define ARROW_UP 0x1E
#define ARROW_DOWN 0x1F
//MAX "xxxxxxxxxxxxxxx"
struct
menu
{
};
struct
status_screen
{
const
char
*
supply_voltage
=
"Uss: V"
;
const
char
*
vcc_voltage
=
"Ucc: V"
;
};
class
Render
{
public:
Render
();
};
SW/main.cpp
View file @
15dc90b7
...
...
@@ -4,6 +4,7 @@
#include
<stdint.h>
#include
"SafeSolderingStation.h"
#include
"Render.h"
int
main
()
...
...
@@ -11,17 +12,30 @@ int main()
sss
.
init
();
sss
.
wellcome
();
/*
sss.lcd.gotoxy_new(0,0);
sss.lcd.write_text("3V4: ");
sss.lcd.gotoxy_new(1,0);
sss.lcd.write_text("24V: V");
*/
status_screen
status
;
sss
.
lcd
.
gotoxy_new
(
0
,
0
);
sss
.
lcd
.
write_text
(
status
.
supply_voltage
);
sss
.
lcd
.
write_char
(
ARROW_UP
);
sss
.
lcd
.
gotoxy_new
(
1
,
0
);
sss
.
lcd
.
write_text
(
status
.
supply_voltage
);
sss
.
lcd
.
write_char
(
ARROW_DOWN
);
for
(;;)
{
//sss.test_encoder();
//sss.test_backlight();
sss
.
test_adc
();
_delay_ms
(
5
0
);
_delay_ms
(
10
0
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment