Skyward boardcore
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
_
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
w
Variables
a
c
d
f
g
h
i
l
m
n
o
p
r
s
t
w
Typedefs
a
b
c
d
e
f
g
h
k
l
m
n
p
r
s
t
Enumerations
a
b
c
d
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
b
c
d
e
f
g
i
k
m
o
p
s
t
u
Enumerations
a
b
c
d
e
f
g
i
m
n
o
p
r
s
t
w
Enumerator
a
b
c
d
f
g
i
m
n
o
p
r
s
t
u
w
Related Symbols
Files
File List
File Members
All
_
c
d
e
f
g
i
l
p
s
t
u
v
Functions
Variables
Typedefs
Enumerations
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
Runcam.h
Go to the documentation of this file.
1
/* Copyright (c) 2021 Skyward Experimental Rocketry
2
* Author: Federico Mandelli
3
*
4
* Permission is hereby granted, free of charge, to any person obtaining a copy
5
* of this software and associated documentation files (the "Software"), to deal
6
* in the Software without restriction, including without limitation the rights
7
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
* copies of the Software, and to permit persons to whom the Software is
9
* furnished to do so, subject to the following conditions:
10
*
11
* The above copyright notice and this permission notice shall be included in
12
* all copies or substantial portions of the Software.
13
*
14
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
* THE SOFTWARE.
21
*/
22
23
/*
24
*Buttons*
25
PowerButton -> near the blue led
26
WifiButton -> near the orange led
27
28
Basic info can be found at
29
https://www.runcam.com/download/split4k/RC_Split_4k_Manual_EN.pdf
30
31
*Leds*
32
Blue led slow blink -> Device is recording
33
Blue led fast blink -> Error (missing SD card or memory full)
34
Blue led still -> Device is in standby and not recording
35
36
Orange led blink -> Firmware is being updated
37
Orange led still -> OSD menu is being displayed
38
39
*Changing settings*
40
To select a setting press the WifiButton, to move down press the
41
PowerButton
42
43
1) Stop the recording by pressing the PowerButton, the blue light should
44
be still 2) Long press the WifiButton the menu will appear on the screen and the
45
orange light well be still
46
47
The menu shoul be appearing as follow a settings submenu is indicated
48
with an arrow connecting the setting to the subsetting
49
50
->Video
51
|->Resolution
52
|->Loop Recording
53
|->Auto Recording
54
|->Save and Exit
55
->Image
56
|->Saturation
57
|->Contrast
58
|->Brightness
59
|->Sharpness
60
|->Exposure
61
|->ISO
62
|->Image Flip
63
|->Metering
64
|->Save and Exit
65
->TV-Out
66
|->Screen Format
67
|->TV Mode
68
|->Save and Exit
69
->Micro SD Card
70
|->Card Infro
71
|->Capacity
72
|->Free Space
73
|->Format Card
74
|->Save and Exit
75
->General
76
|->Power Frequency
77
|->Volume
78
|->Auto Power Up
79
|->Auto Shutdown
80
|->Reset
81
|->Language
82
|->Save and Exit
83
->Save and exit
84
85
86
* Class used to control runcam split v4
87
* User Manual:
88
https://www.runcam.com/download/split4k/RC_Split_4k_Manual_EN.pdf
89
* Devide Protocol:
90
https://support.runcam.com/hc/en-us/articles/360014537794-RunCam-Device-Protocol
91
* Protocl Implementation:
92
https://github.com/ArduPilot/ardupilot/blob/32482a29db341a1e228d92f682d24a47c1c4c0a4/libraries/AP_Camera/AP_RunCam.h
93
* crc8 version= Crc8 dvb-s2
94
95
* Camera Control 0xCC||0x01||CameraControlAction||crc8
96
RCDEVICE_PROTOCOL_SIMULATE_WIFI_BTN = 0xCC010032, //Simulate Press
97
of the Wi-Fi button RCDEVICE_PROTOCOL_SIMULATE_POWER_BTN = 0xCC0101E7,
98
//Simulate Press of the Power button RCDEVICE_PROTOCOL_CHANGE_MODE =
99
0xCC01024D, //In Standby Mode, long press the Mode Switch button to cycle
100
through the two modes: Video/OSD settings(Long press wifi button);
101
*/
102
103
#pragma once
104
105
#include <
diagnostic/PrintLogger.h
>
106
#include <
utils/Debug.h
>
107
108
#include "
drivers/usart/USART.h
"
109
110
namespace
Boardcore
111
{
112
116
class
Runcam
117
{
118
public
:
119
explicit
Runcam
(
USARTInterface
& serial);
120
121
Runcam
() =
delete
;
122
123
bool
init
();
124
125
bool
close
();
126
127
void
openMenu
();
128
129
void
selectSetting
();
130
131
void
moveDown
();
132
133
private
:
134
bool
isInit =
false
;
135
139
uint32_t SELECT_SETTING = 0xCC010032;
140
144
uint32_t MOVE_DOWN = 0xCC0101E7;
145
150
uint32_t OPEN_MENU = 0xCC01024D;
151
152
USARTInterface
& usart;
153
154
PrintLogger
logger =
Logging::getLogger
(
"runcam"
);
155
};
116
class
Runcam
{
…
};
156
157
}
// namespace Boardcore
Debug.h
PrintLogger.h
USART.h
Boardcore::Logging::getLogger
static PrintLogger getLogger(const string &name)
Definition
PrintLogger.h:103
Boardcore::PrintLogger
Definition
PrintLogger.h:58
Boardcore::Runcam
Class for controlling the Runcam via uart.
Definition
Runcam.h:117
Boardcore::Runcam::init
bool init()
Definition
Runcam.cpp:32
Boardcore::Runcam::Runcam
Runcam()=delete
Boardcore::Runcam::selectSetting
void selectSetting()
Definition
Runcam.cpp:67
Boardcore::Runcam::moveDown
void moveDown()
Definition
Runcam.cpp:72
Boardcore::Runcam::openMenu
void openMenu()
Definition
Runcam.cpp:65
Boardcore::Runcam::close
bool close()
Definition
Runcam.cpp:49
Boardcore::USARTInterface
Abstract class that implements the interface for the USART/UART serial communication.
Definition
USART.h:70
Boardcore
This file includes all the types the logdecoder script will decode.
Definition
ActiveObject.h:31
src
shared
drivers
runcam
Runcam.h
Generated by
1.10.0