Skip to content

Commit 8cd2f44

Browse files
authored
Merge pull request #1 from m5stack/dev
Dev
2 parents 770fa41 + 13c4102 commit 8cd2f44

File tree

105 files changed

+14527
-1342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+14527
-1342
lines changed

.clang-format

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
AccessModifierOffset: -4
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveMacros: true
7+
AlignConsecutiveAssignments: true
8+
AlignConsecutiveDeclarations: false
9+
AlignEscapedNewlines: Left
10+
AlignOperands: true
11+
AlignTrailingComments: true
12+
AllowAllArgumentsOnNextLine: true
13+
AllowAllConstructorInitializersOnNextLine: true
14+
AllowAllParametersOfDeclarationOnNextLine: true
15+
AllowShortBlocksOnASingleLine: Never
16+
AllowShortCaseLabelsOnASingleLine: false
17+
AllowShortFunctionsOnASingleLine: false
18+
AllowShortLambdasOnASingleLine: All
19+
AllowShortIfStatementsOnASingleLine: WithoutElse
20+
AllowShortLoopsOnASingleLine: true
21+
AlwaysBreakAfterDefinitionReturnType: None
22+
AlwaysBreakAfterReturnType: None
23+
AlwaysBreakBeforeMultilineStrings: true
24+
AlwaysBreakTemplateDeclarations: Yes
25+
BinPackArguments: true
26+
BinPackParameters: true
27+
BraceWrapping:
28+
AfterCaseLabel: false
29+
AfterClass: false
30+
AfterControlStatement: false
31+
AfterEnum: false
32+
AfterFunction: true
33+
AfterNamespace: false
34+
AfterObjCDeclaration: false
35+
AfterStruct: false
36+
AfterUnion: false
37+
AfterExternBlock: false
38+
BeforeCatch: false
39+
BeforeElse: false
40+
IndentBraces: false
41+
SplitEmptyFunction: true
42+
SplitEmptyRecord: true
43+
SplitEmptyNamespace: true
44+
BreakBeforeBinaryOperators: None
45+
BreakBeforeBraces: Custom
46+
BreakBeforeInheritanceComma: false
47+
BreakInheritanceList: BeforeColon
48+
BreakBeforeTernaryOperators: true
49+
BreakConstructorInitializersBeforeComma: false
50+
BreakConstructorInitializers: BeforeColon
51+
BreakAfterJavaFieldAnnotations: false
52+
BreakStringLiterals: true
53+
ColumnLimit: 120
54+
CommentPragmas: '^ IWYU pragma:'
55+
CompactNamespaces: false
56+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
57+
ConstructorInitializerIndentWidth: 4
58+
ContinuationIndentWidth: 4
59+
Cpp11BracedListStyle: true
60+
DeriveLineEnding: true
61+
DerivePointerAlignment: true
62+
DisableFormat: false
63+
ExperimentalAutoDetectBinPacking: false
64+
FixNamespaceComments: true
65+
ForEachMacros:
66+
- foreach
67+
- Q_FOREACH
68+
- BOOST_FOREACH
69+
IncludeBlocks: Regroup
70+
IncludeCategories:
71+
- Regex: '^<ext/.*\.h>'
72+
Priority: 2
73+
SortPriority: 0
74+
- Regex: '^<.*\.h>'
75+
Priority: 1
76+
SortPriority: 0
77+
- Regex: '^<.*'
78+
Priority: 2
79+
SortPriority: 0
80+
- Regex: '.*'
81+
Priority: 3
82+
SortPriority: 0
83+
IncludeIsMainRegex: '([-_](test|unittest))?$'
84+
IncludeIsMainSourceRegex: ''
85+
IndentCaseLabels: true
86+
IndentGotoLabels: true
87+
IndentPPDirectives: None
88+
IndentWidth: 4
89+
IndentWrappedFunctionNames: false
90+
JavaScriptQuotes: Leave
91+
JavaScriptWrapImports: true
92+
KeepEmptyLinesAtTheStartOfBlocks: false
93+
MacroBlockBegin: ''
94+
MacroBlockEnd: ''
95+
MaxEmptyLinesToKeep: 1
96+
NamespaceIndentation: None
97+
ObjCBinPackProtocolList: Never
98+
ObjCBlockIndentWidth: 2
99+
ObjCSpaceAfterProperty: false
100+
ObjCSpaceBeforeProtocolList: true
101+
PenaltyBreakAssignment: 2
102+
PenaltyBreakBeforeFirstCallParameter: 1
103+
PenaltyBreakComment: 300
104+
PenaltyBreakFirstLessLess: 120
105+
PenaltyBreakString: 1000
106+
PenaltyBreakTemplateDeclaration: 10
107+
PenaltyExcessCharacter: 1000000
108+
PenaltyReturnTypeOnItsOwnLine: 200
109+
PointerAlignment: Left
110+
RawStringFormats:
111+
- Language: Cpp
112+
Delimiters:
113+
- cc
114+
- CC
115+
- cpp
116+
- Cpp
117+
- CPP
118+
- 'c++'
119+
- 'C++'
120+
CanonicalDelimiter: ''
121+
BasedOnStyle: google
122+
- Language: TextProto
123+
Delimiters:
124+
- pb
125+
- PB
126+
- proto
127+
- PROTO
128+
EnclosingFunctions:
129+
- EqualsProto
130+
- EquivToProto
131+
- PARSE_PARTIAL_TEXT_PROTO
132+
- PARSE_TEST_PROTO
133+
- PARSE_TEXT_PROTO
134+
- ParseTextOrDie
135+
- ParseTextProtoOrDie
136+
CanonicalDelimiter: ''
137+
BasedOnStyle: google
138+
ReflowComments: true
139+
SortIncludes: false
140+
SortUsingDeclarations: true
141+
SpaceAfterCStyleCast: false
142+
SpaceAfterLogicalNot: false
143+
SpaceAfterTemplateKeyword: true
144+
SpaceBeforeAssignmentOperators: true
145+
SpaceBeforeCpp11BracedList: false
146+
SpaceBeforeCtorInitializerColon: true
147+
SpaceBeforeInheritanceColon: true
148+
SpaceBeforeParens: ControlStatements
149+
SpaceBeforeRangeBasedForLoopColon: true
150+
SpaceInEmptyBlock: false
151+
SpaceInEmptyParentheses: false
152+
SpacesBeforeTrailingComments: 2
153+
SpacesInAngles: false
154+
SpacesInConditionalStatement: false
155+
SpacesInContainerLiterals: true
156+
SpacesInCStyleCastParentheses: false
157+
SpacesInParentheses: false
158+
SpacesInSquareBrackets: false
159+
SpaceBeforeSquareBrackets: false
160+
Standard: Auto
161+
StatementMacros:
162+
- Q_UNUSED
163+
- QT_REQUIRE_VERSION
164+
TabWidth: 4
165+
UseCRLF: false
166+
UseTab: Never
167+
...

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.vscode/settings.json
2+
projects/core135_llm_product_test_ui
3+
projects/imx678_test
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# llm-camera
2+
视频源单元,用于从 USB V4L2 视频设备中获取视频流到内部通道。
3+
4+
## setup
5+
配置单元工作。
6+
7+
发送 json:
8+
```json
9+
{
10+
"request_id":"2",
11+
"work_id":"camera",
12+
"action":"setup",
13+
"object":"camera.setup",
14+
"data":{
15+
"response_format":"camera.raw",
16+
"input":"/dev/video0",
17+
"enoutput":false,
18+
"frame_width":320,
19+
"frame_height":320
20+
}
21+
}
22+
```
23+
- request_id:参考基本数据解释。
24+
- work_id:配置单元时,为 `camera`
25+
- action:调用的方法为 `setup`
26+
- object:传输的数据类型为 `camera.setup`
27+
- response_format:返回结果为 `camera.raw`,是 yuv422 格式。
28+
- input:读取的设备名。
29+
- frame_width:输出的视频帧宽。
30+
- frame_height:输出的视频帧高。
31+
- enoutput:是否起用用户结果输出。如果不需要获取摄像头图片,请不要开启该参数,视频流会增加信道的通信压力。
32+
33+
响应 json:
34+
35+
```json
36+
{
37+
"created":1731488402,
38+
"data":"None",
39+
"error":{
40+
"code":0,
41+
"message":""
42+
},
43+
"object":"None",
44+
"request_id":"2",
45+
"work_id":"camera.1003"
46+
}
47+
```
48+
- created:消息创建时间,unix 时间。
49+
- work_id:返回成功创建的 work_id 单元。
50+
51+
52+
## exit
53+
54+
单元退出。
55+
56+
发送 json:
57+
58+
```json
59+
{
60+
"request_id": "7",
61+
"work_id": "camera.1003",
62+
"action": "exit",
63+
}
64+
```
65+
66+
响应 json:
67+
68+
```json
69+
{
70+
"created":1731488402,
71+
"data":"None",
72+
"error":{
73+
"code":0,
74+
"message":""
75+
},
76+
"object":"None",
77+
"request_id":"7",
78+
"work_id":"camera.1003"
79+
}
80+
```
81+
82+
error::code 为 0 表示执行成功。
83+
84+
## taskinfo
85+
86+
获取任务列表。
87+
88+
发送 json:
89+
```json
90+
{
91+
"request_id": "2",
92+
"work_id": "camera",
93+
"action": "taskinfo"
94+
}
95+
```
96+
97+
响应 json:
98+
99+
```json
100+
{
101+
"created":1731652311,
102+
"data":["camera.1003"],
103+
"error":{
104+
"code":0,
105+
"message":""
106+
},
107+
"object":"camera.tasklist",
108+
"request_id":"2",
109+
"work_id":"camera"
110+
}
111+
```
112+
113+
获取任务运行参数。
114+
115+
发送 json:
116+
```json
117+
{
118+
"request_id": "2",
119+
"work_id": "camera.1003",
120+
"action": "taskinfo"
121+
}
122+
```
123+
124+
响应 json:
125+
126+
```json
127+
{
128+
"created":1731652344,
129+
"data":{
130+
"enoutput":false,
131+
"response_format":"camera.raw",
132+
"input":"/dev/video0",
133+
"frame_width":320,
134+
"frame_height":320
135+
},
136+
"error":{
137+
"code":0,
138+
"message":""
139+
},
140+
"object":"camera.taskinfo",
141+
"request_id":"2",
142+
"work_id":"camera.1003"
143+
}
144+
```
145+
146+
147+
> **注意:work_id 是按照单元的初始化注册顺序增加的,并不是固定的索引值。**

0 commit comments

Comments
 (0)