Skip to content

Commit

Permalink
release 1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyBondarev committed Apr 22, 2021
1 parent 2c16b1b commit 202fbf4
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/OpenIMU300RI/IMU/openimu.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"appVersion": "OpenIMU300RI IMU_J1939 1.0.1",
"appVersion": "OpenIMU300RI IMU_J1939 3.1.9",
"description": "9-axis OpenIMU with triaxial rate, acceleration, and magnetic measurement",
"userConfiguration": [
{ "paramId": 0, "category": "General", "paramType": "disabled", "type": "uint64", "name": "Data CRC" },
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenIMU300RI/IMU/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ platform = aceinna_imu
lib_archive = false
board = OpenIMU300
;lib_deps = ../../../openIMU300-lib
lib_deps = OpenIMU300-base-library@~1.1.10
lib_deps = OpenIMU300-base-library@~1.1.11
build_flags =
; -D CLI
-D IMU_ONLY
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenIMU300RI/IMU/src/appVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License.
#ifndef _IMU_APP_VERSION_H
#define _IMU_APP_VERSION_H

#define APP_VERSION_STRING "IMU_J1939 03.01.08"
#define APP_VERSION_STRING "IMU_J1939 03.01.09"


#endif
41 changes: 39 additions & 2 deletions examples/OpenIMU300RI/IMU/src/user/UserConfiguration.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ void userInitConfigureUnit()

if(EEPROM_IsUserApplicationActive())
{
ApplyEcuControlSettings(&gEcuConfig);
ApplyEcuUserSettings(&gEcuConfig);
ApplySystemParameters(&gEcuConfig);
}else {
ApplyEcuFactorySettings(&gEcuConfig);
}

info = getBuildInfo();
Expand Down Expand Up @@ -185,11 +187,15 @@ BOOL SaveUserConfig(void)
BOOL ApplyLegacyConfigParameters()
{
BOOL fApply = FALSE;

uint16_t orientation = GetNewOrientation();
uint16_t accelFiltr = GetNewAccelFiltr();
uint16_t rateFiltr = GetNewRateFiltr();
uint16_t ecuAddress = GetNewEcuAddress();
uint16_t ecuBaudrate = GetNewEcuBaudrate();
uint16_t ecuPacketType = GetNewEcuPacketType();
uint16_t ecuPacketRate = GetNewEcuPacketRate();

uint16_t ecuUartBaudrate = GetNewEcuUartBaudrate();
uint16_t ecuUartPacketType = GetNewEcuPacketType();
uint16_t ecuUartPacketRate = GetNewEcuUartPacketRate();
Expand All @@ -204,6 +210,7 @@ BOOL ApplyLegacyConfigParameters()
fApply = TRUE;
*(uint64_t *)gUserConfiguration.uartConfig.uartPacketType = type;
}

if(ecuUartPacketRate != 0xFFFF){
fApply = TRUE;
gUserConfiguration.uartConfig.uartPacketRate = platformGetPacketRate(ecuUartPacketRate);
Expand Down Expand Up @@ -234,6 +241,17 @@ BOOL ApplyLegacyConfigParameters()
gUserConfiguration.ecuBaudRate = ecuBaudrate;
}

if(ecuPacketRate != 0xFFFF){
fApply = TRUE;
gUserConfiguration.ecuPacketRate = ecuPacketRate;
}

if(ecuPacketType != 0xFFFF){
fApply = TRUE;
gUserConfiguration.ecuPacketType = ecuPacketType;
}


if(fApply){
if(!SaveUserConfig()){
return FALSE;
Expand Down Expand Up @@ -456,9 +474,11 @@ void ApplySystemParameters(void *pConfig)
UserInitConfigureUart();
platformSetEcuBaudrate(gUserConfiguration.ecuBaudRate);
platformSetEcuAddress(gUserConfiguration.ecuAddress);
platformSetEcuPacketRate(gUserConfiguration.ecuPacketRate);
platformSetEcuPacketType(gUserConfiguration.ecuPacketType);
}

void ApplyEcuControlSettings(void *pConfig)
void ApplyEcuUserSettings(void *pConfig)
{
EcuConfigurationStruct *pEcuConfig = (EcuConfigurationStruct *)pConfig;

Expand All @@ -473,6 +493,16 @@ void ApplyEcuControlSettings(void *pConfig)
pEcuConfig->user_behavior = gUserConfiguration.userBehavior;
}

void ApplyEcuFactorySettings(void *pConfig)
{
EcuConfigurationStruct *pEcuConfig = (EcuConfigurationStruct *)pConfig;

pEcuConfig->address = platformGetEcuAddress();
pEcuConfig->baudRate = platformGetEcuBaudrate();
pEcuConfig->packet_rate = platformGetEcuPacketRate();
pEcuConfig->packet_type = platformGetEcuPacketType();
}

void UpdateEcuOrientationSettings(uint16_t data)
{
gEcuConfig.orien_bits = data;
Expand Down Expand Up @@ -506,4 +536,11 @@ void UpdateEcuRateFilterSettings(uint16_t data)
gUserConfiguration.ecuFilterFreqRate = data;
}

void CheckUpdateCanPacketTypeRate()
{
if(EEPROM_IsUserApplicationActive() == FALSE){
gEcuConfig.packet_rate = platformGetEcuPacketRate();
gEcuConfig.packet_type = platformGetEcuPacketType();
}
}

4 changes: 3 additions & 1 deletion examples/OpenIMU300RI/IMU/src/user/UserConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ extern BOOL checkIfUserEEPROMErased(void);
extern BOOL loadUserConfigFromEeprom(uint8_t *ptrToUserConfigInRam, int *userConfigSize);
extern BOOL SaveUserConfig(void);
extern BOOL LoadDefaultUserConfig(BOOL fSave);
extern void ApplyEcuControlSettings(void* pEcuConfig);
extern void ApplyEcuFactorySettings(void* pEcuConfig);
extern void ApplyEcuUserSettings(void* pEcuConfig);
extern void ApplySystemParameters(void* pEcuConfig);
extern void UserInitConfigureUart();
extern void CopyUserUartConfig(UserConfigurationUartStruct *ext, BOOL toLocal);
Expand All @@ -228,6 +229,7 @@ extern BOOL SwapPitchAndroll();
extern BOOL UseNWUFrame();
extern BOOL SwapRequestPGN();
extern BOOL OrientationToAscii(uint8_t *asciiOrien, uint16_t hexOrien);
extern void CheckUpdateCanPacketTypeRate();



Expand Down
2 changes: 1 addition & 1 deletion examples/OpenIMU300RI/INS/openimu.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"appVersion": "OpenIMU300ZI INS 1.1.0",
"appVersion": "OpenIMU300ZI INS 3.1.9",
"description": "9-axis OpenIMU with triaxial rate, acceleration, and magnetic measurement",
"userConfiguration": [
{ "paramId": 0,"category": "General", "paramType": "disabled", "type": "uint64", "name": "Data CRC" },
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenIMU300RI/INS/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ platform = aceinna_imu
lib_archive = false
board = OpenIMU300
;lib_deps = ../../../openIMU300-lib
lib_deps = OpenIMU300-base-library@~1.1.10
lib_deps = OpenIMU300-base-library@~1.1.11
build_flags =
-D GPS
-D GPS_OVER_CAN
Expand Down
7 changes: 7 additions & 0 deletions examples/OpenIMU300RI/INS/src/user/UserConfiguration.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,4 +541,11 @@ void UpdateEcuUartPacketType(uint64_t data)
*(uint64_t *)gUserConfiguration.uartConfig.uartPacketType = data;
}

void CheckUpdateCanPacketTypeRate()
{
if(EEPROM_IsUserApplicationActive() == FALSE){
gEcuConfig.packet_rate = platformGetEcuPacketRate();
gEcuConfig.packet_type = platformGetEcuPacketType();
}
}

1 change: 1 addition & 0 deletions examples/OpenIMU300RI/INS/src/user/UserConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ extern BOOL UseNWUFrame();
extern BOOL SwapRequestPGN();
extern BOOL OrientationToAscii(uint8_t *asciiOrien, uint16_t hexOrien);
extern BOOL UseAutoBaud();
extern void CheckUpdateCanPacketTypeRate();



Expand Down
2 changes: 1 addition & 1 deletion examples/OpenIMU300RI/VG_AHRS/openimu.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"appVersion": "OpenIMU300RI VG_AHRS_J1939 03.01.04",
"appVersion": "OpenIMU300RI VG_AHRS_J1939 03.01.09",
"type": "openimu",
"description": "9-axis OpenIMU with triaxial rate, acceleration, and magnetic measurement",
"userConfiguration": [
Expand Down
2 changes: 1 addition & 1 deletion examples/OpenIMU300RI/VG_AHRS/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ platform = aceinna_imu
lib_archive = false
board = OpenIMU300
;lib_deps = ../../../openIMU300-lib
lib_deps = OpenIMU300-base-library@~1.1.10
lib_deps = OpenIMU300-base-library@~1.1.11
build_flags =
; -D CLI
; Comment next line for VG algorithm
Expand Down
7 changes: 7 additions & 0 deletions examples/OpenIMU300RI/VG_AHRS/src/user/UserConfiguration.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,3 +517,10 @@ void UpdateEcuUartPacketType(uint64_t data)
}


void CheckUpdateCanPacketTypeRate()
{
if(EEPROM_IsUserApplicationActive() == FALSE){
gEcuConfig.packet_rate = platformGetEcuPacketRate();
gEcuConfig.packet_type = platformGetEcuPacketType();
}
}
1 change: 1 addition & 0 deletions examples/OpenIMU300RI/VG_AHRS/src/user/UserConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ extern BOOL UseNWUFrame();
extern BOOL SwapRequestPGN();
extern BOOL OrientationToAscii(uint8_t *asciiOrien, uint16_t hexOrien);
extern BOOL UseAutoBaud();
extern void CheckUpdateCanPacketTypeRate();



Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"type": "git",
"url": "https://github.com/aceinna/platform-aceinna_imu.git"
},
"version": "1.3.2",
"version": "1.3.3",
"packages": {
"toolchain-gccarmnoneeabi": {
"type": "toolchain",
Expand Down

0 comments on commit 202fbf4

Please sign in to comment.