I'm working based on the HRS central application, and have run into an issue where my if statement is entered even though the condition is not met. In this case, the nrf attempts to perform open scanning even though I have whitelist scanning enabled. I've tried replacing the nordic types with basic ints but I see the same issue.
I debug, check that scan_mode = 1, and then the debugger enters the if statement. See picture below: