AP_Scripting: adjust for updated LED API

This commit is contained in:
Andrew Tridgell 2020-02-09 21:35:56 +11:00 committed by Randy Mackay
parent 8ea159fe4e
commit 18a9dce6e9
2 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ function set_Rainbow(chan, led, v)
r = math.floor(rainbow[row][1] + p * (rainbow[row+1][1] - rainbow[row][1])) r = math.floor(rainbow[row][1] + p * (rainbow[row+1][1] - rainbow[row][1]))
g = math.floor(rainbow[row][2] + p * (rainbow[row+1][2] - rainbow[row][2])) g = math.floor(rainbow[row][2] + p * (rainbow[row+1][2] - rainbow[row][2]))
b = math.floor(rainbow[row][3] + p * (rainbow[row+1][3] - rainbow[row][3])) b = math.floor(rainbow[row][3] + p * (rainbow[row+1][3] - rainbow[row][3]))
serialLED:set_RGB(chan, uint32_t(1 << led), r, g, b) serialLED:set_RGB(chan, led, r, g, b)
end end
--[[ --[[

View File

@ -143,8 +143,8 @@ singleton AP_Vehicle method set_mode boolean uint8_t 0 UINT8_MAX ModeReason::SCR
include AP_SerialLED/AP_SerialLED.h include AP_SerialLED/AP_SerialLED.h
singleton AP_SerialLED alias serialLED singleton AP_SerialLED alias serialLED
singleton AP_SerialLED method set_num_LEDs boolean uint8_t 1 16 uint8_t 0 32 singleton AP_SerialLED method set_num_LEDs boolean uint8_t 1 16 uint8_t 0 AP_SERIALLED_MAX_LEDS
singleton AP_SerialLED method set_RGB void uint8_t 1 16 uint32_t 0U UINT32_MAX uint8_t 0 UINT8_MAX uint8_t 0 UINT8_MAX uint8_t 0 UINT8_MAX singleton AP_SerialLED method set_RGB void uint8_t 1 16 int8_t -1 INT8_MAX uint8_t 0 UINT8_MAX uint8_t 0 UINT8_MAX uint8_t 0 UINT8_MAX
singleton AP_SerialLED method send void singleton AP_SerialLED method send void
include SRV_Channel/SRV_Channel.h include SRV_Channel/SRV_Channel.h