SCLFlicButtonMode

enum SCLFlicButtonMode {}

Represents the different modes that you can configure the button to operate in. These modes typically affect both click latency and expected battery life.

  • Using this mode will give your button the lowest possible click latency (typicaly less than 30 ms). However, since this mode increases current consumption significantly, this mode will only work while the application is in the foreground. As soon as the app leaves the foreground it will be set back to the regular latency setting. Please only use this if you have a very good reason for it, such as if you are designing a foreground game that requires it. Since this is designed for foreground use the button will only advertise, at most, one minute after connection is lost. After one minute you will need to push the button again in order to activate the advertisement.

    Declaration

    Objective-C

    SCLFlicButtonModeLowLatency = 0

    Swift

    case lowLatency = 0
  • This is the default mode of the button. It will give you a good compromise between click latency (less than 280 ms) and current consumption. This is intended to be used with use-cases where the button should be connected at all time regardless if the app is in the foreground or background. Once a connection is lost, the button will continue to advertise indefinitely in order to re-establish the connection as soon as possible when the button and the device comes into range with eachother.

    Declaration

    Objective-C

    SCLFlicButtonModeNormal

    Swift

    case normal = 1
  • This mode will have the same click latency as the Normal mode while connected. However, in order to preserve battery while the button is not used for extended periods of time, the button will only advertise, at most, one hour after connection is lost. After one hour you will need to push the button again in order to activate the advertisement again.

    Declaration

    Objective-C

    SCLFlicButtonModeBatterySave

    Swift

    case batterySave = 2