| | |
| | | #define ID_SM_LIGHT_EXAM_REQ 0x0012 |
| | | #define ID_MS_LIGHT_EXAM_RES 0x8012 |
| | | #define ID_SM_DISTANCE 0x0020 |
| | | |
| | | #define ID_SM_CARSENSOR 0x0013 |
| | | |
| | | #define MA_OUT_GPS_BRIEF 0x0001 |
| | | #define MA_OUT_RTK_BRIEF 0x0002 |
| | |
| | | writer.String(brief->version); |
| | | writer.Key("selftest"); |
| | | writer.Int(brief->selftest); |
| | | writer.Key("gpio"); |
| | | writer.Int(brief->gpio); |
| | | writer.Key("speed"); |
| | | writer.Int(brief->speed); |
| | | writer.Key("engine"); |
| | | writer.Int(brief->engine); |
| | | // writer.Key("gpio"); |
| | | // writer.Int(brief->gpio); |
| | | // writer.Key("speed"); |
| | | // writer.Int(brief->speed); |
| | | // writer.Key("engine"); |
| | | // writer.Int(brief->engine); |
| | | writer.Key("sn"); |
| | | writer.String(brief->sn); |
| | | |
| | |
| | | SendMsgToMainProcIndep(ID_SM_MCU_BRIEF, sb.GetString()); |
| | | } |
| | | |
| | | void MA_SendCarSensorBrief(const struct carSensorBrief *brief) |
| | | { |
| | | StringBuffer sb; |
| | | Writer<StringBuffer> writer(sb); |
| | | |
| | | writer.StartObject(); |
| | | |
| | | writer.Key("odo"); |
| | | writer.Int(brief->odo); |
| | | writer.Key("trip"); |
| | | writer.Int(brief->trip); |
| | | writer.Key("trip_time"); |
| | | writer.Int(brief->tripTime); |
| | | writer.Key("cell_volt"); |
| | | writer.Double(brief->cellVolt); |
| | | writer.Key("engine"); |
| | | writer.Double(brief->engine); |
| | | writer.Key("sas"); |
| | | writer.Int(brief->sas); |
| | | writer.Key("key"); |
| | | writer.Int(brief->key); |
| | | writer.Key("gear"); |
| | | writer.Int(brief->gear); |
| | | writer.Key("aps"); |
| | | writer.Int(brief->aps); |
| | | writer.Key("lock"); |
| | | writer.Int(brief->lock); |
| | | writer.Key("seat_belt"); |
| | | writer.Int(brief->seatBelt); |
| | | writer.Key("clutch"); |
| | | writer.Int(brief->clutch); |
| | | writer.Key("horn"); |
| | | writer.Int(brief->horn); |
| | | writer.Key("wiper"); |
| | | writer.Int(brief->wiper); |
| | | writer.Key("hand_break"); |
| | | writer.Int(brief->handBreak); |
| | | writer.Key("main_break"); |
| | | writer.Int(brief->mainBreak); |
| | | writer.Key("left_turn_lamp"); |
| | | writer.Int(brief->leftTurnLamp); |
| | | writer.Key("right_turn_lamp"); |
| | | writer.Int(brief->rightTurnLamp); |
| | | writer.Key("clearance_lamp"); |
| | | writer.Int(brief->clearanceLamp); |
| | | writer.Key("dipped_beam_lamp"); |
| | | writer.Int(brief->dippedBeamLamp); |
| | | writer.Key("main_beam_lamp"); |
| | | writer.Int(brief->mainBeamLamp); |
| | | writer.Key("fog_lamp"); |
| | | writer.Int(brief->fogLamp); |
| | | writer.Key("assist_break"); |
| | | writer.Int(brief->assBreak); |
| | | writer.Key("surround1"); |
| | | writer.Int(brief->surround1); |
| | | writer.Key("surround2"); |
| | | writer.Int(brief->surround2); |
| | | writer.Key("surround3"); |
| | | writer.Int(brief->surround3); |
| | | writer.Key("surround4"); |
| | | writer.Int(brief->surround4); |
| | | |
| | | writer.EndObject(); |
| | | |
| | | SendMsgToMainProcIndep(ID_SM_CARSENSOR, sb.GetString()); |
| | | } |
| | | |
| | | void MA_SendGpsBrief(const struct gpsBrief *brief) |
| | | { |
| | | if (!(OnOff & MA_OUT_GPS_BRIEF)) |