Skip to content

Commit

Permalink
Quick commit before playing with LCD again
Browse files Browse the repository at this point in the history
  • Loading branch information
20336020 committed May 13, 2019
1 parent 467b161 commit df479ea
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="493489874641781129" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="-1216117270905547391" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -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>
Expand Down
6 changes: 5 additions & 1 deletion Inc/MyFunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ extern volatile uint8_t GPSAltI;
extern struct bme280_dev dev;
extern volatile int8_t rslt;
extern struct bme280_data comp_data;
extern volatile int8_t BME_T;
extern volatile double BME_P;
extern volatile double BME_H;
extern char BME_T_s[3];

void MyPrintFunc(volatile uint8_t TimeOn, volatile char GPSTime[], volatile double GPSLatF, volatile double GPSLongF, volatile float GPSAltF, volatile double CPrint, volatile double VPrint);
void MyPrintFunc(volatile uint8_t TimeOn, volatile char GPSTime[], volatile double GPSLatF, volatile double GPSLongF, volatile float GPSAltF, volatile double CPrint, volatile double VPrint, volatile int8_t BME_T, volatile double BME_P, volatile double BME_H);
int MyCheckSum(volatile char GPSCo[]);
void MyGPSTime(volatile char GPSCo[]);
void CVProcess(volatile double VMeas, volatile double CMeas);
Expand Down
8 changes: 6 additions & 2 deletions Src/MyFunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
#include <stdlib.h>
I2C_HandleTypeDef hi2c1;

void MyPrintFunc(volatile uint8_t TimeOn, volatile char GPSTime[], volatile double GPSLatF, volatile double GPSLongF, volatile float GPSAltF, volatile double CPrint, volatile double VPrint)
void MyPrintFunc(volatile uint8_t TimeOn, volatile char GPSTime[], volatile double GPSLatF, volatile double GPSLongF, volatile float GPSAltF, volatile double CPrint, volatile double VPrint, volatile int8_t BME_T, volatile double BME_P, volatile double BME_H)
{
TimeOn = HAL_GetTick()/1000;
sprintf(display, "$20336020,%5d,%2.2s:%2.2s:%2.2s, 0, 0, 0, 0, 0, 0,%10.6f,%11.6f,%7.1f,%3.0lf,%3.1lf\n", (uint8_t)TimeOn, &GPSTime[0], &GPSTime[2], &GPSTime[4], GPSLatF, GPSLongF, GPSAltF, CPrint, VPrint);
sprintf(display, "$20336020,%5d,%2.2s:%2.2s:%2.2s,%3d,%3.0f,%3.0f, 0, 0, 0,%10.6f,%11.6f,%7.1f,%3.0lf,%3.1lf\n", (uint8_t)TimeOn, &GPSTime[0], &GPSTime[2], &GPSTime[4], BME_T, BME_H,BME_P, GPSLatF, GPSLongF, GPSAltF, CPrint, VPrint);
HAL_UART_Transmit(&huart1, (uint8_t*)display, 91, 1000);
}

Expand Down Expand Up @@ -422,4 +422,8 @@ int8_t My_BME_Config() {

void Get_BME_Data() {
bme280_get_sensor_data(BME280_ALL, &comp_data, &dev);
BME_H = (comp_data.humidity)/1024;
BME_P = (comp_data.pressure)/100000;
BME_T = (comp_data.temperature)/100;
sprintf(BME_T_s, "%d", BME_T);
}
9 changes: 7 additions & 2 deletions Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ volatile uint8_t GPSAltI = 0;
struct bme280_dev dev;
struct bme280_data comp_data;
volatile int8_t rslt = BME280_OK;
volatile int8_t BME_T = 0;
volatile double BME_P = 0;
volatile double BME_H = 0;
char BME_T_s[3];
/* USER CODE END PV */

/* Private function prototypes -----------------------------------------------*/
Expand Down Expand Up @@ -200,10 +204,11 @@ int main(void)
/* USER CODE BEGIN 3 */
if (flag == 1) {

MyPrintFunc(TimeOn, GPSTime, GPSLatF, GPSLongF, GPSAltF, CPrint, VPrint);
MyPrintFunc(TimeOn, GPSTime, GPSLatF, GPSLongF, GPSAltF, CPrint, VPrint, BME_T, BME_P, BME_H);
Get_BME_Data();
LCD_Conv(Burn);
flag = 0;
Get_BME_Data();

}

TickTime = HAL_GetTick();
Expand Down

0 comments on commit df479ea

Please sign in to comment.