Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
164 changes: 164 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
SortPriority: 0
- Regex: '^<.*\.h>'
Priority: 1
SortPriority: 0
- Regex: '^<.*'
Priority: 2
SortPriority: 0
- Regex: '.*'
Priority: 3
SortPriority: 0
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: true
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
RawStringFormats:
- Language: Cpp
Delimiters:
- cc
- CC
- cpp
- Cpp
- CPP
- 'c++'
- 'C++'
CanonicalDelimiter: ''
BasedOnStyle: google
- Language: TextProto
Delimiters:
- pb
- PB
- proto
- PROTO
EnclosingFunctions:
- EqualsProto
- EquivToProto
- PARSE_PARTIAL_TEXT_PROTO
- PARSE_TEST_PROTO
- PARSE_TEXT_PROTO
- ParseTextOrDie
- ParseTextProtoOrDie
CanonicalDelimiter: ''
BasedOnStyle: google
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Auto
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
UseTab: Never
1 change: 0 additions & 1 deletion .github/workflows/launcher-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ jobs:
run: |
mkdir -p projects/APPLaunch/dist/bin
cp projects/AppStore/dist/M5CardputerZero-AppStore projects/APPLaunch/dist/bin/
cp projects/AppStore/dist/APPLaunch/bin/appstore.py projects/APPLaunch/dist/bin/
cp projects/Calculator/dist/M5CardputerZero-Calculator projects/APPLaunch/dist/bin/
cp projects/ZClaw/dist/ZClaw projects/APPLaunch/dist/bin/
mkdir -p projects/APPLaunch/APPLaunch/applications
Expand Down
2 changes: 1 addition & 1 deletion SDK
Submodule SDK updated 1 files
+3 −2 components/hv/SConstruct
63 changes: 63 additions & 0 deletions ext_components/cp0_lvgl/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,67 @@ config CP0_LVGL_USE_ZMQ_RPC
bool "Enable cp0 lvgl local ZMQ automation RPC"
default n

menu "Optional runtime services"

config CP0_LVGL_INIT_FILESYSTEM
bool "Initialize filesystem service"
default n
config CP0_LVGL_INIT_CONFIG
bool "Initialize configuration service"
default n
config CP0_LVGL_INIT_PTY
bool "Initialize PTY service"
default n
config CP0_LVGL_INIT_RPC
bool "Initialize RPC service"
default n
config CP0_LVGL_INIT_AUDIO
bool "Initialize audio service"
default n
config CP0_LVGL_INIT_PROCESS
bool "Initialize process service"
default n
config CP0_LVGL_INIT_SUDO
bool "Initialize sudo signals"
default n
config CP0_LVGL_INIT_OSINFO
bool "Initialize OS information service"
default n
config CP0_LVGL_INIT_SCREENSHOT
bool "Initialize screenshot service"
default n
config CP0_LVGL_INIT_LORA
bool "Initialize LoRa service"
default n
config CP0_LVGL_INIT_WIFI
bool "Initialize Wi-Fi service"
select CP0_LVGL_INIT_PROCESS
default n
config CP0_LVGL_INIT_BLUETOOTH
bool "Initialize Bluetooth service"
default n
config CP0_LVGL_INIT_SETTINGS
bool "Initialize settings service"
default n
config CP0_LVGL_INIT_BQ27220
bool "Initialize BQ27220 service"
default n
config CP0_LVGL_INIT_IMU
bool "Initialize IMU service"
default n
config CP0_LVGL_INIT_SAVED_SETTINGS
bool "Apply saved LVGL settings"
default n
config CP0_LVGL_INIT_BATTERY
bool "Initialize battery service"
default n
config CP0_LVGL_INIT_CAMERA
bool "Initialize camera service"
default n
config CP0_LVGL_INIT_SOUNDCARD
bool "Initialize sound card service"
default n

endmenu

endif
61 changes: 57 additions & 4 deletions ext_components/cp0_lvgl/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,64 @@ if "CONFIG_CP0_LVGL_COMPONENT_ENABLED" in os.environ or "CONFIG_SIGSLOT_COMPONEN
SRCS = []
INCLUDE = [ADir('include')]
PRIVATE_INCLUDE = []
REQUIREMENTS = ['lvgl_component', 'eventpp', 'Miniaudio', 'RadioLib']
REQUIREMENTS = ['lvgl_component', 'eventpp']
STATIC_LIB = []
DYNAMIC_LIB = []
DEFINITIONS = []
DEFINITIONS_PRIVATE = []
LDFLAGS = []
LINK_SEARCH_PATH = []
optional_services = {
'AUDIO': 'audio',
'BATTERY': 'battery',
'BQ27220': 'bq27220',
'CAMERA': 'camera',
'CONFIG': 'config',
'FILESYSTEM': 'filesystem',
'IMU': 'imu',
'LORA': 'lara',
'OSINFO': 'osinfo',
'PROCESS': 'process',
'PTY': 'pty',
'SCREENSHOT': 'screenshot',
'SETTINGS': 'settings',
'SOUNDCARD': 'soundcard',
'WIFI': 'network',
}

def service_enabled(name):
return 'CONFIG_CP0_LVGL_INIT_' + name in os.environ

for name in optional_services:
if service_enabled(name):
DEFINITIONS += ['-DCONFIG_CP0_LVGL_INIT_' + name + '=1']
for name in ['RPC', 'SUDO', 'BLUETOOTH', 'SAVED_SETTINGS']:
if service_enabled(name):
DEFINITIONS += ['-DCONFIG_CP0_LVGL_INIT_' + name + '=1']

if service_enabled('AUDIO'):
REQUIREMENTS += ['Miniaudio']
if service_enabled('LORA'):
REQUIREMENTS += ['RadioLib']

SRCS += Glob('src/*.c*')
if 'CONFIG_V9_5_LV_USE_SDL' in os.environ:
DEFINITIONS += ['-DHAL_PLATFORM_SDL=1']
DEFINITIONS += pkg_config_cflags('sdl2')
REQUIREMENTS += pkg_config_ldflags('sdl2')
SRCS += Glob('src/sdl/*.c*')
platform_srcs = Glob('src/sdl/*.c*')
platform_srcs += [
File('src/cp0/cp0_camera_viewport.cpp'),
File('src/cp0/cp0_desktop_exec_policy.cpp'),
File('src/cp0/cp0_process_commands.cpp'),
File('src/cp0/cp0_process_lifecycle.cpp'),
]
else:
SRCS += Glob('src/cp0/*.c*')
platform_srcs = Glob('src/cp0/*.c*')
REQUIREMENTS += ['input', 'xkbcommon', 'udev', 'pthread']
REQUIREMENTS += [':libdbus-1.so.3']
REQUIREMENTS += ['camera', 'camera-base', 'jpeg']
if service_enabled('CAMERA'):
REQUIREMENTS += ['camera', 'camera-base', 'jpeg']
PRIVATE_INCLUDE += [toolchain_path('usr', 'include', 'dbus-1.0'),
toolchain_path('usr', 'lib', env.get('GCC_DUMPMACHINE', ''), 'dbus-1.0', 'include')]

Expand All @@ -43,6 +83,19 @@ if "CONFIG_CP0_LVGL_COMPONENT_ENABLED" in os.environ or "CONFIG_SIGSLOT_COMPONEN
if 'zmq' not in REQUIREMENTS:
REQUIREMENTS += ['zmq']

source_selected_services = {'AUDIO', 'CAMERA', 'IMU', 'LORA'}
for source in platform_srcs:
source_name = str(source).lower()
disabled = any(token in source_name and not service_enabled(name)
for name, token in optional_services.items()
if name in source_selected_services)
# The LoRa implementation historically used "lara" in one filename,
# while the bridge service uses the correct "lora" spelling.
if not service_enabled('LORA') and ('lora' in source_name or 'lara' in source_name):
disabled = True
if not disabled:
SRCS.append(source)

env["COMPONENTS"].append(
{
"target": os.path.basename(env["component_dir"]),
Expand Down
Loading
Loading