* CANID: 1026 (0x402)
*/
CAN_OBJECT(CidACOnOff, gboolean, NULL);
-CAN_OBJECT(AirDistributionCID, guchar, NULL);
+CAN_OBJECT(AirDistributionCID, guint16, NULL);
CAN_OBJECT(LeftTemperatureCID, gdouble, NULL);
CAN_OBJECT(LeftAirflowCID, guint16, NULL);
CAN_OBJECT(RightTemperatureCID, gdouble, NULL);
* Left Knob Control
* CANID: 1793 (0x701)
*/
-CAN_OBJECT(AirDistributionLeftKnob, guchar, NULL);
+CAN_OBJECT(AirDistributionLeftKnob, guint16, NULL);
CAN_OBJECT(LeftTemperatureLeftKnob, gdouble, NULL);
CAN_OBJECT(LeftAirflowLeftKnob, guint16, NULL);
CAN_OBJECT(MediaVolumeLeftKnob, guint16, NULL);
* Right Knob Control
* CANID: 1794 (0x702)
*/
-CAN_OBJECT(AirDistributionRightKnob, guchar, NULL);
+CAN_OBJECT(AirDistributionRightKnob, guint16, NULL);
CAN_OBJECT(RightTemperatureRightKnob, gdouble, NULL);
CAN_OBJECT(RightAirflowLeftKnob, guint16, NULL);
CAN_OBJECT(MediaVolumeRightKnob, guint16, NULL);
CAN_OBJECT_WRITABLE(CidCheckSeatHeaterR, guint16, NULL);
CAN_OBJECT_WRITABLE(CidCheckSeatCoolerL, guint16, NULL);
CAN_OBJECT_WRITABLE(CidCheckSeatCoolerR, guint16, NULL);
-CAN_OBJECT_WRITABLE(AirDistributionCID, guint16, NULL);
+CAN_OBJECT_WRITABLE(AirDistributionCID, guint16, NULL);
CAN_OBJECT_WRITABLE(LeftTemperatureCID, gdouble, NULL);
CAN_OBJECT_WRITABLE(LeftAirflowCID, guint16, NULL);
CAN_OBJECT_WRITABLE(RightTemperatureCID, gdouble, NULL);
* Writable AMB Object
* Left Knob Control
*/
-CAN_OBJECT_WRITABLE(AirDistributionLeftKnob, guchar, NULL);
+CAN_OBJECT_WRITABLE(AirDistributionLeftKnob, guint16, NULL);
CAN_OBJECT_WRITABLE(LeftTemperatureLeftKnob, gdouble, NULL);
CAN_OBJECT_WRITABLE(LeftAirflowLeftKnob, guint16, NULL);
CAN_OBJECT_WRITABLE(MediaVolumeLeftKnob, guint16, NULL);
* Writable AMB Object
* Right Knob Control
*/
-CAN_OBJECT_WRITABLE(AirDistributionRightKnob, guchar, NULL);
+CAN_OBJECT_WRITABLE(AirDistributionRightKnob, guint16, NULL);
CAN_OBJECT_WRITABLE(RightTemperatureRightKnob, gdouble, NULL);
CAN_OBJECT_WRITABLE(RightAirflowLeftKnob, guint16, NULL);
CAN_OBJECT_WRITABLE(MediaVolumeRightKnob, guint16, NULL);
test_CheckSeatHeaterL();
}
+void test_AirDistribution()
+{
+ struct AirDistributionCIDType *p;
+ int ret = amb_get_AirDistributionCID_with_zone(&p, 0);
+ if (ret != 0) {
+ fprintf(stderr, "Fail to %s\n", __func__);
+ return ;
+ }
+ fprintf(stderr, "Zone: %d\n", p->Zone);
+ fprintf(stderr, "Value: %d\n", p->Value);
+ fprintf(stderr, "ValueSequence: %d\n", p->ValueSequence);
+ fprintf(stderr, "Time: %f\n", p->Time);
+
+ amb_release_data(p);
+ return ;
+}
+
+static void test_set_AirDistribution(int value)
+{
+ int rc;
+
+ rc = amb_set_AirDistributionCID_with_zone(value, 0);
+ if (rc < 0) {
+ fprintf(stderr, "Fail to amb_set_CheckSeatHeaterL_with_zone(): %d\n", rc);
+ return ;
+ }
+
+ test_AirDistribution();
+}
+
int main()
{
+ test_set_AirDistribution(2);
test_set_CheckSeatHeaterL(1);
test_set_CheckSeatHeaterL(2);