Changing appTxDutyCycle during interrupt

I would like to change the appTxDutyCycle from 15 minutes to 60 seconds while the user button is pressed but back to 15 minutes when the user button is released. I would also like to update alert from “0” to “1”. What would be the best way to handle this?

Hi,

Maybe you can refer this code: