Commit af87129f authored by Lucas Drezet's avatar Lucas Drezet
Browse files

fix bugs, remove last frame received and sent on LCD, upgrade amount of...

fix bugs, remove last frame received and sent on LCD, upgrade amount of websocket connection at same time
parent cbef6756
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.757250542" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-1211557677994413605" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.286540973" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-1211557677994413605" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.757250542" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1637907223727722171" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.286540973" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1637907223727722171" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
</project>
This diff is collapsed.
......@@ -151,58 +151,20 @@ void addrLCD(int *isConnected) {
if (!strcmp(buffer, "0.0.0.0")) {//If the current IPv4 is "0.0.0.0" (aka not connected)
if (*isConnected == 0) {//If the link just disconnected, update the display
BSP_LCD_SetTextColor(LCD_COLOR_WHITE);
BSP_LCD_FillRect(200, 70, 300, 20);
BSP_LCD_FillRect(200, 200, 300, 20);
BSP_LCD_SetTextColor(LCD_COLOR_UGA);
BSP_LCD_DisplayStringAt(15, 70, strcat(displayAddr, "CONNECTING..."), LEFT_MODE);
BSP_LCD_DisplayStringAt(15, 200, strcat(displayAddr, "CONNECTING..."), LEFT_MODE);
*isConnected = 1;
}
} else if (*isConnected == 1) {//If the current IPv4 Address is != "0.0.0.0" (aka connected) and the link just connected, update the display
BSP_LCD_SetTextColor(LCD_COLOR_WHITE);
BSP_LCD_FillRect(200, 70, 300, 20);
BSP_LCD_FillRect(200, 200, 300, 20);
BSP_LCD_SetTextColor(LCD_COLOR_UGA);
BSP_LCD_DisplayStringAt(15, 70, strcat(displayAddr, buffer), LEFT_MODE);
BSP_LCD_DisplayStringAt(15, 200, strcat(displayAddr, buffer), LEFT_MODE);
*isConnected = 0;
}
}
/**
* @brief Display the last message received from CAN bus and sent to client
**/
void canbusToClient() {
char_t displayData[13];
BSP_LCD_SetTextColor(LCD_COLOR_WHITE);
BSP_LCD_FillRect(180, 190, 60, 60);
BSP_LCD_SetTextColor(LCD_COLOR_UGA);
BSP_LCD_DisplayStringAt(15, 170, "Last message received:", LEFT_MODE);
osSprintf(displayData, " - STDID: 0x%x", RxHeader.StdId);
BSP_LCD_DisplayStringAt(0, 190, displayData, LEFT_MODE);
osSprintf(displayData, " - BYTE0: 0x%x", RxData[0]);
BSP_LCD_DisplayStringAt(0, 210, displayData, LEFT_MODE);
osSprintf(displayData, " - BYTE1: 0x%x", RxData[1]);
BSP_LCD_DisplayStringAt(0, 230, displayData, LEFT_MODE);
}
/**
* @brief Display the last message received from client and sent to CAN bus
**/
void clientToCANBus(uint32_t stdid) {
char_t displayData[13];
BSP_LCD_SetTextColor(LCD_COLOR_WHITE);
BSP_LCD_FillRect(180, 310, 60, 60);
BSP_LCD_SetTextColor(LCD_COLOR_UGA);
BSP_LCD_DisplayStringAt(15, 290, "Last message sent:", LEFT_MODE);
osSprintf(displayData, " - STDID: 0x%x", stdid);
BSP_LCD_DisplayStringAt(0, 310, displayData, LEFT_MODE);
osSprintf(displayData, " - BYTE0: 0x%x", TxData[0]);
BSP_LCD_DisplayStringAt(0, 330, displayData, LEFT_MODE);
osSprintf(displayData, " - BYTE1: 0x%x", TxData[1]);
BSP_LCD_DisplayStringAt(0, 350, displayData, LEFT_MODE);
}
/**
* @brief System clock configuration
**/
......@@ -438,7 +400,6 @@ error_t httpServerUriNotFoundCallback(HttpConnection *connection,
* @brief send data from CAN bus to client
**/
void sendCANBusToClient() {
canbusToClient();//Display the message on LCD
char_t buffer[128];
//Format XML data
int n = sprintf(buffer, "<data>\r\n");
......@@ -504,8 +465,6 @@ void parseMessage(char_t *buffer, size_t size, WebSocket *ws) {
!= HAL_OK) {
//transmission Error
TRACE_ERROR("CAN transmission error!\r\n");
} else {
clientToCANBus(stdid);//Display the message on LCD
}
}
}
......@@ -642,8 +601,6 @@ int_t main(void) {
headerLCD();
footerLCD();
logoLCD();
canbusToClient();
clientToCANBus(0);
//Initialize CAN
MX_GPIO_Init();
......
......@@ -44,7 +44,7 @@
//Number of WebSockets that can be opened simultaneously
#ifndef WEB_SOCKET_MAX_COUNT
#define WEB_SOCKET_MAX_COUNT 4
#define WEB_SOCKET_MAX_COUNT 32
#elif (WEB_SOCKET_MAX_COUNT < 1)
#error WEB_SOCKET_MAX_COUNT parameter is not valid
#endif
......
......@@ -160,7 +160,6 @@ function upSensorFloor(floor, currentState,lastState) {
if(currentState==lastState)return;
if (floor == 0) return;
changeIndicator(floor, currentState,lastState, "indicatorUF" + floor);
//if(currentState==1)checkAnimationCabin(floor,1);
}
function downSensorFloor(floor, currentState,lastState) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment