[FIXED with AM 3.7.4 Final] HW_Connected not working for Character Display MAX7219 / ADC Input

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: russ, Ralph

Post Reply
Message
Author
SimPassion
Posts: 5340
Joined: Thu Jul 27, 2017 12:22 am

[FIXED with AM 3.7.4 Final] HW_Connected not working for Character Display MAX7219 / ADC Input

#1 Post by SimPassion »

It looks like hw_connected is not working for MAX7219 Character Display

this always return "false" :

Code: Select all

function set_hw_chr_bright(bright)
	print(" MAX7219 Connected : "..tostring(hw_connected(display_chr_id)))
	if hw_connected(display_chr_id) then
		hw_chr_display_set_brightness(display_chr_id, 0, bright)
	end
end

display_chr_id = hw_chr_display_add("MAX7219 LEDs display OUTPUT Channel", "MAX7219",1)
print(" MAX7219 Connected : "..tostring(hw_connected(display_chr_id)))

hw_max_bright		= hw_adc_input_add("LEDs Brightness", set_hw_chr_bright)
print(" ADC Connected : "..tostring(hw_connected(hw_max_bright)))
if hw_connected(hw_max_bright) then
	print(" Connected : "..tostring(hw_connected(hw_max_bright)))
	cur_bright		= hw_adc_input_read(hw_max_bright)
	set_hw_chr_bright(cur_bright)
end
After going further, it looks like the hw_connected() statement get some issue in any case, as it even don't work with ADC Input

Gilles

AM_3.7.3_HW_Connected_Issue_01.jpg
Last edited by SimPassion on Tue Jun 02, 2020 9:19 pm, edited 1 time in total.

User avatar
Corjan
Posts: 2940
Joined: Thu Nov 19, 2015 9:04 am

Re: AM 3.7.3 Final HW_Connected not working for Character Display MAX7219 / ADC Input

#2 Post by Corjan »

Hi,


There was a big bug in the way hw_connected is determined for the Arduino.

I have fixed it, it will make it's way into the next hotfix version. Probably somewhere by the end of next week.


As always, thanks for posting!

Corjan

SimPassion
Posts: 5340
Joined: Thu Jul 27, 2017 12:22 am

Re: AM 3.7.3 Final HW_Connected not working for Character Display MAX7219 / ADC Input

#3 Post by SimPassion »

Thanks for the feedback @Corjan
never thought to bring some work in the week-end : the answer could had wait too
enjoy the week-end

Gilles

SimPassion
Posts: 5340
Joined: Thu Jul 27, 2017 12:22 am

Re: AM 3.7.3 Final HW_Connected not working for Character Display MAX7219 / ADC Input

#4 Post by SimPassion »

Thanks @Corjan for the hard work
things seems fixed for these parts :

AM_3.7.4_Final.jpg

AM_3.7.4_Final_Check.jpg

Gilles

Post Reply