|
@@ -159,12 +159,18 @@ static int keyfromstring(char *key, SymStruct *table, int tableCount)
|
|
|
}
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
-static uint16_t defaultRatedCurrent(uint32_t gunType, int powerKey)
|
|
|
+static uint16_t defaultRatedCurrent(uint8_t modelType, uint32_t gunType, int powerKey)
|
|
|
{
|
|
|
uint16_t ret = RC_0A;
|
|
|
|
|
|
- if(powerKey == BADKEY)
|
|
|
- powerKey = POWER_30W;
|
|
|
+ if (powerKey == BADKEY)
|
|
|
+ {
|
|
|
+ powerKey = POWER_30W;
|
|
|
+ if (modelType == MODEL_DD || modelType == MODEL_DX)
|
|
|
+ {
|
|
|
+ powerKey = POWER_360W;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
switch (gunType) {
|
|
|
case GUN_TYPE_J:
|
|
@@ -615,7 +621,7 @@ int RatedCurrentParsing(char *pModuleName, void *pDestStruct)
|
|
|
modelKey = keyfromstring(&model[0], &modelTable[0], sizeof(modelTable) / sizeof(SymStruct));
|
|
|
reguKey = keyfromstring(®ulation[0], ®ulationTable[0], sizeof(regulationTable) / sizeof(SymStruct));
|
|
|
if ((gunTypeKey = keyfromstring(&gunType[0], &gunTypeTable[0], sizeof(gunTypeTable) / sizeof(SymStruct))) == GUN_TYPE_0) {
|
|
|
- log_error("Rated Current Parsing the type of gun is none\r\n");
|
|
|
+ //log_error("Rated Current Parsing the type of gun is none\r\n");
|
|
|
continue;
|
|
|
//return FAIL;
|
|
|
}
|
|
@@ -624,7 +630,7 @@ int RatedCurrentParsing(char *pModuleName, void *pDestStruct)
|
|
|
ret = ((modelKey << 24) | (reguKey << 16) | (powerKey << 8) | gunTypeKey);
|
|
|
ratingCurVal = exchangeRatingCur(ret);
|
|
|
if (ratingCurVal == RC_0A) {
|
|
|
- ratingCurVal = defaultRatedCurrent(gunTypeKey, powerKey);
|
|
|
+ ratingCurVal = defaultRatedCurrent(modelKey, gunTypeKey, powerKey);
|
|
|
}
|
|
|
|
|
|
memset((uint8_t *)&fGunAndVol, 0, sizeof(GunTypeAndVolInfo));
|