SteelSeries / gamesense-sdk

472 stars 146 forks source link

Color Range does not work on apex pro tkl #112

Open willin opened 3 years ago

willin commented 3 years ago

Errored Event:

{
    game: 'V0',
    event: 'CPU',
    min_value: 0,
    max_value: 100,
    icon_id: 27,
    handlers: [
      {
        'device-type': 'keyboard',
        zone: 'function-keys',
        color: [
          {
            low: 0,
            high: 10,
            color: {
              red: 0,
              green: 255,
              blue: 0
            }
          },
          {
            low: 11,
            high: 100,
            color: {
              gradient: {
                zero: {
                  red:0,
                  green: 255,
                  blue: 0
                },
                hundred: {
                  red: 255,
                  green: 0,
                  blue: 0
                }
              }
            }
          }
        ],
        mode: 'percent'
      }
    ]
  }

when use this above, always only show F1 on.

but works this way:

{
  game: 'V0',
  event: 'CPU',
  min_value: 0,
  max_value: 100,
  icon_id: 27,
  handlers: [
    {
      'device-type': 'keyboard',
      zone: 'function-keys',
      color: {
        gradient: {
          zero: {
            red: 0,
            green: 0,
            blue: 255
          },
          hundred: {
            red: 255,
            green: 0,
            blue: 0
          }
        }
      },
      mode: 'percent'
    }
  ]
}