Can't get the onVolChange to work #1
hyperion007
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I can't seem to get the callback for the Main Volume to work.
DENON_AVR CINEMA; // Instance of class
// Create instances of Properties you want to use
// DenonProperties::DenonProperties(const char *);
DenonProperties *Main_Volume = new DenonProperties(MAIN_VOLUME);
DenonProperties *Power = new DenonProperties(MAIN_ZONE);
DenonProperties *SamplingRate = new DenonProperties("SSINFAISFSV");
void VolumeChanged(const char response, size_t len){ //call as char
Serial.println("Volume changed to:");
Serial.write(response, len);
Serial.write('\r');
Serial.write('\n');
}
//setup callback functions
CINEMA.onConnect(denon_connected);
CINEMA.onDisconnect(denon_disconnected);
CINEMA.onError(conError);
CINEMA.onDenonResponse(denonResponded);
//setup callback for properties
Main_Volume->onStateUpdate(VolumeChanged);
Power->onStateUpdate(PowerChanged);
SamplingRate->onStateUpdate(SamplingRateChanged);
This is the output on Serial Monitor when I use the remote to increase the volume:
client has been connected at 192.168.1.5:23MV07Volume changed to:
07
MVMAX 88
Volume changed to:
MAX 88
MV075
Volume changed to:
075
MVMAX 88
Volume changed to:
MAX 88
MV08
Volume changed to:
08
MVMAX 88
Volume changed to:
MAX 88
What I'm trying to do is get the volume and display it on a OLED display since my AVR is in a closet.
Beta Was this translation helpful? Give feedback.
All reactions