if no bind at all, the instrument is running without AM CTD
Any idea what I've done wrong in the script or if this is a real bug ?
I also get this "Assertion Failed" message when all is bind properly and running the instrument : ADC Input and 2 x 8 digits modules wired on MAX7219 board
Gilles
Code: Select all
up_daisychain_nb = user_prop_add_integer("MAX7219 Daisy Chain modules number", 1, 8, 1, "(Optional) Select your current max daisy chained MAX7219 number. Default is 1.")
daisychain_nb = user_prop_get(up_daisychain_nb)
str_chr_display = "8.8.8.8.8.8.8.8."
--====================================================================================
-- HARDWARE HANDLING
--====================================================================================
-- MAX7219 LEDs displays
display_chr_id = hw_chr_display_add("MAX7219 LEDs display OUTPUT Channel", "MAX7219", daisychain_nb) -- Character display name / Type / Number
function set_hw_chr_bright(bright)
if hw_connected(display_chr_id) then
hw_chr_display_set_brightness(display_chr_id, 0, bright)
hw_chr_display_set_text(display_chr_id, 0, 0, str_chr_display)
if daisychain_nb > 1 then
for i=2,daisychain_nb do
hw_chr_display_set_brightness(display_chr_id, i-1, bright)
hw_chr_display_set_text(display_chr_id, i-1, 0, str_chr_display)
end
end
end
end
hw_max_bright = hw_adc_input_add("LEDs Brightness", set_hw_chr_bright)
if hw_connected(hw_max_bright) then
cur_bright = hw_adc_input_read(hw_max_bright)
set_hw_chr_bright(cur_bright)
end