Skip to content

Use bit flags for SystemStatusList widget ids#186

Open
leohoo wants to merge 1 commit into
dji-sdk:dev-sdk-mainfrom
sensyn-robotics:fix/use-bit-flags
Open

Use bit flags for SystemStatusList widget ids#186
leohoo wants to merge 1 commit into
dji-sdk:dev-sdk-mainfrom
sensyn-robotics:fix/use-bit-flags

Conversation

@leohoo

@leohoo leohoo commented Oct 24, 2023

Copy link
Copy Markdown

Since SystemStatusSmartListModel uses bitwise-and to manage item exclusion, we should declare uxsdk_excludeItem and SystemStatusListItem as bit flags.

fun isItemExcluded(excludeItems: Int): Boolean {
return excludeItems and this.value == this.value
}

@Padreco-lbr

Padreco-lbr commented Nov 9, 2023

Copy link
Copy Markdown

Please accept this pull request, I applied it locally and works fine. The current strategy for item exclusion is simply broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants