mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 08:45:24 +03:00
Issue #826 fixed
This commit is contained in:
parent
f7de9e510a
commit
57e2428c29
2 changed files with 25 additions and 19 deletions
|
@ -51,12 +51,14 @@
|
|||
#define TRACE_WARNING(...) do { printf("-W- " __VA_ARGS__); fflush(stdout); } while(0)
|
||||
#define TRACE_WARNING_WP(...) do { printf(__VA_ARGS__); fflush(stdout); } while(0)
|
||||
#define TRACE_ERROR(...) do { printf("-E- " __VA_ARGS__); fflush(stdout); } while(0)
|
||||
inline void dump(unsigned char *data, unsigned int size)
|
||||
inline void dump(void * data, unsigned int size)
|
||||
{
|
||||
unsigned char *uchar_data = (unsigned char *)data;
|
||||
|
||||
printf("DUMP %d bytes ...\n\r", size);
|
||||
unsigned int i = 0, j=0;
|
||||
while (i*32+j < size) {
|
||||
printf("%.2X ", data[i*32+j]);
|
||||
printf("%.2X ", uchar_data[i*32+j]);
|
||||
j++;
|
||||
if (j==32) {
|
||||
i++; j=0;
|
||||
|
|
|
@ -507,9 +507,11 @@ void ConvertModel_215_to_216(ModelData &model)
|
|||
g_model.expoData[i].weight = oldModel.expoData[i].weight;
|
||||
memcpy(&g_model.expoData[i].name, &oldModel.expoData[i].name, LEN_EXPOMIX_NAME);
|
||||
if (oldModel.expoData[i].curveMode==0/*expo*/) {
|
||||
if (oldModel.expoData[i].curveParam) {
|
||||
g_model.expoData[i].curve.type = CURVE_REF_EXPO;
|
||||
g_model.expoData[i].curve.value = oldModel.expoData[i].curveParam;
|
||||
}
|
||||
}
|
||||
else if (oldModel.expoData[i].curveParam <= 6) {
|
||||
g_model.expoData[i].curve.type = CURVE_REF_FUNC;
|
||||
g_model.expoData[i].curve.value = oldModel.expoData[i].curveParam;
|
||||
|
@ -710,6 +712,7 @@ void ConvertModel_215_to_216(ModelData &model)
|
|||
g_model.swashR.collectiveSource = ConvertSource_215_to_216(g_model.swashR.collectiveSource);
|
||||
|
||||
for (uint8_t i=0; i<9; i++) {
|
||||
if (oldModel.phaseData[i].swtch) {
|
||||
memcpy(&g_model.phaseData[i], &oldModel.phaseData[i], sizeof(oldModel.phaseData[i])); // the last 4 gvars will remain blank
|
||||
g_model.phaseData[i].swtch = ConvertSwitch_215_to_216(oldModel.phaseData[i].swtch);
|
||||
#if defined(PCBTARANIS)
|
||||
|
@ -729,6 +732,7 @@ void ConvertModel_215_to_216(ModelData &model)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
g_model.thrTraceSrc = oldModel.thrTraceSrc;
|
||||
#if defined(PCBTARANIS)
|
||||
// S3 added
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue