def METHOD_NAME(self, controller: FlexController):
    self.value_min = controller.min
    self.value_max = controller.max
    if controller.min == 0.0 and controller.max == 1.0:
        self.mode = 1
    elif controller.min == -1.0 and controller.max == 1.0:
        self.mode = 2
    elif controller.min == -1.0 and controller.max == 0:
        self.mode = 3
    else:
        self.mode = 0