Anthem serial command with variable
Denis
Posts: 163
Hi
I try to send a serial commande trough variable in an Anthem TLP1
the string has to look that TFP13 meaning set band1 (FM1) preset 3
I tried
But I get an invalid parameter from TLP1
Any cue?
I try to send a serial commande trough variable in an Anthem TLP1
the string has to look that TFP13 meaning set band1 (FM1) preset 3
I tried
//VARIABLE CHAR nTUNER_PRESET_NUM CHAR nTUNER_PRESET_BAND //CODE BUTTON_EVENT [dvTP_TUNER,13] { PUSH: { nTUNER_PRESET_BAND = 1 } } BUTTON_EVENT [dvTP_TUNER,14] { PUSH: { nTUNER_PRESET_BAND = 2 } } BUTTON_EVENT [dvTP_TUNER,1] { PUSH: { nTUNER_PRESET_NUM = 1 } } BUTTON_EVENT [dvTP_TUNER,2] { PUSH: { nTUNER_PRESET_NUM = 2 } } BUTTON_EVENT [dvTP_TUNER,3] { PUSH: { nTUNER_PRESET_NUM = 3 } } BUTTON_EVENT [dvTP_TUNER,4] { PUSH: { nTUNER_PRESET_NUM = 4 } } BUTTON_EVENT [dvTP_TUNER,5] { PUSH: { nTUNER_PRESET_NUM = 5 } } BUTTON_EVENT [dvTP_TUNER,16] { PUSH: { SEND_STRING dvTLP1, "'TFP',nTUNER_PRESET_BAND,nTUNER_PRESET_NUM,$0A" SEND_COMMAND dvTP_TUNER,"'@TXT',70,nPREAMP_BUFF" CLEAR_BUFFER nPREAMP_BUFF } }
But I get an invalid parameter from TLP1
Any cue?
0
Comments
don't you just need the itoa? if I am reading your post correctly
or am I missing something?
Thanks guys.
I tried ITOA but here is my error
Close. ITOA is a function that takes an integer as its parameter (which is the value inside the parethesis) and will return the ascii equivelent (which will sit where the ITOA is called from). Because you are converting two decimal values you need to call it twice: