Modify IfPm5 function to handle PM5 conditionally
Add conditional handling for PM5 presence based on build configuration. Signed-off-by: Niel Nielsen <nieldk@gmail.com>
This commit is contained in:
1 parent
cc208f3219
commit
94b61d494f
1 file changed
+6
-1
@@ -123,8 +123,13 @@ bool IfPm3FpcUsartFromUsb(void) {
|
||||
}
|
||||
|
||||
bool IfPm5(void) {
|
||||
if (IfPm3Present() == false)
|
||||
if (IfPm3Present() == false) {
|
||||
#ifdef DEFAULT_PM5
|
||||
return true; // client built for PM5 -> assume PM5 when offline
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
return g_pm3_capabilities.is_pm5;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user