by tmk » Wed Apr 18, 2012 7:44 am
Here are the functions I am using for testing....
/*
As seen on a Holden from ZerOne. Testing for COMPOSITE ON OFF.
//Nav Audio
0x4 0x19a 0x094 | 1 | 10 33 40 94 01
0x4 0x19a 0x094 | 1 | 10 33 40 94 00
Or..
0x4 0x171 0x094 | 2 | 10 2E 20 94 01 00
0x4 0x171 0x094 | 2 | 10 2E 20 94 01 00
0x4 0x171 0x094 | 2 | 10 2E 20 94 21 00
0x4 0x171 0x094 | 2 | 10 2E 20 94 20 00
0x4 0x171 0x094 | 2 | 10 2E 20 94 24 00
0x4 0x171 0x094 | 2 | 10 2E 20 94 24 00
*/
#define NAVSCRARB 0x10334094
#define NAVSCRARB2 0x102e2094
// Nav AUDIO
void navaudio(byte onoff)
{
can_send_29bit_message(0x10334094, onoff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01);
}
void navon()
{
Serial.println("NAV COMP ON");
can_send_29bit_message(0x102e2094, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02);
}
void navoff()
{
Serial.println("NAV COMP OFF");
can_send_29bit_message(0x102e2094, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02);
delay(50);
}
void navRegister()
{
/*
0x4 0x171 0x094 | 2 | 10 2E 20 94 01 00
0x4 0x172 0x094 | 1 | 10 2E 40 94 03
0x4 0x183 0x094 | 4 | 10 30 60 94 01 C0 00 03
0x4 0x19a 0x094 | 1 | 10 33 40 94 00
0x4 0x171 0x094 | 2 | 10 2E 20 94 21 00
0x4 0x183 0x094 | 4 | 10 30 60 94 01 C0 00 03
0x4 0x053 0x094 | 6 | 10 0A 60 94 0C 04 10 20 60 1A
0x4 0x171 0x094 | 2 | 10 2E 20 94 25 00
0x4 0x19a 0x094 | 1 | 10 33 40 94 00
*/
Serial.println("REgistered NAV..?");
//10 2E 20 94 01 00
can_send_29bit_message(0x102e2094, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02);
delay(100);
//10 2E 40 94 03
can_send_29bit_message(0x102e4094, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01);
delay(100);
//10 30 60 94 01 C0 00 03
can_send_29bit_message(0x10306094, 0x01, 0xC0, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x04);
delay(100);
//10 33 40 94 00
can_send_29bit_message(0x10334094, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01);
delay(100);
//10 2E 20 94 21 00
can_send_29bit_message(0x10220094, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02);
delay(100);
//10 30 60 94 01 C0 00 03
can_send_29bit_message(0x10306094, 0x01, 0xC0, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x04);
delay(100);
//10 0A 60 94 0C 04 10 20 60 1A
can_send_29bit_message(0x100a6094, 0x0C, 0x04, 0x10, 0x20, 0x60, 0x1A, 0x00, 0x00, 0x06);
delay(100);
//10 2E 20 94 25 00
can_send_29bit_message(0x102e2094, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02);
delay(100);
//10 33 40 94 00
can_send_29bit_message(0x10334094, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01);
}
Register First.. Then send navon() or navoff().. navaudio(0x00 or 0x01) should mute/unmute too..
TMK