REMOVE UNUSED CODE
This commit is contained in:
parent
d579aff233
commit
c6258b5ac5
|
@ -33,7 +33,7 @@ int MLX90640_I2CRead(uint8_t slaveAddr, uint16_t startAddress, uint16_t nMemAddr
|
||||||
int ack = 0;
|
int ack = 0;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
ack = HAL_I2C_Mem_Read(&hi2c2, (slaveAddr<<1), startAddress, I2C_MEMADD_SIZE_16BIT, bp, nMemAddressRead*2, 500);
|
ack = HAL_I2C_Mem_Read(&hi2c2, (slaveAddr<<1), startAddress, I2C_MEMADD_SIZE_16BIT, bp, nMemAddressRead*2, 50);
|
||||||
|
|
||||||
if (ack != HAL_OK)
|
if (ack != HAL_OK)
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ int MLX90640_I2CWrite(uint8_t slaveAddr, uint16_t writeAddress, uint16_t data)
|
||||||
cmd[0] = data >> 8;
|
cmd[0] = data >> 8;
|
||||||
cmd[1] = data & 0x00FF;
|
cmd[1] = data & 0x00FF;
|
||||||
|
|
||||||
ack = HAL_I2C_Mem_Write(&hi2c2, sa, writeAddress, I2C_MEMADD_SIZE_16BIT, cmd, sizeof(cmd), 500);
|
ack = HAL_I2C_Mem_Write(&hi2c2, sa, writeAddress, I2C_MEMADD_SIZE_16BIT, cmd, sizeof(cmd), 50);
|
||||||
|
|
||||||
if (ack != HAL_OK)
|
if (ack != HAL_OK)
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,7 +142,7 @@ static void drawMeasurement(void ) {
|
||||||
static void drawPicture(void) {
|
static void drawPicture(void) {
|
||||||
for (y=0; y<24; y++) {
|
for (y=0; y<24; y++) {
|
||||||
for (x=0; x<32; x++) {
|
for (x=0; x<32; x++) {
|
||||||
BSP_LCD_FillRect(x*10, y*11, 9, 11, TempToColor(tempValues[(x) + (y*32)]));
|
BSP_LCD_FillRect(x*10, y*11, 10, 11, TempToColor(tempValues[(x) + (y*32)]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,15 +167,7 @@ static void readTempValues(void) {
|
||||||
|
|
||||||
MLX90640_CalculateTo(mlx90640Frame, &mlx90640, EMMISIVITY, tr, tempValues);
|
MLX90640_CalculateTo(mlx90640Frame, &mlx90640, EMMISIVITY, tr, tempValues);
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
APP_LOG(TS_OFF,VLEVEL_L, "\r\n\n\n");
|
|
||||||
for (uint8_t y=0; y < 24; y++) {
|
|
||||||
for (uint8_t x=0; x<32; x++) {
|
|
||||||
APP_LOG(TS_OFF, VLEVEL_L, "%c ", (uint8_t)((((float)tempValues[y*32+x]- 25.0)) + 0x30));
|
|
||||||
}
|
|
||||||
APP_LOG(TS_OFF,VLEVEL_L, "\r\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlx90640_display_process(void){
|
void mlx90640_display_process(void){
|
||||||
|
|
|
@ -1140,6 +1140,7 @@ static void SPIx_Write(uint8_t Value)
|
||||||
HAL_StatusTypeDef status = HAL_OK;
|
HAL_StatusTypeDef status = HAL_OK;
|
||||||
uint8_t data;
|
uint8_t data;
|
||||||
|
|
||||||
|
|
||||||
status = HAL_SPI_TransmitReceive(&hspi1, (uint8_t*) &Value, &data, 1, SpixTimeout);
|
status = HAL_SPI_TransmitReceive(&hspi1, (uint8_t*) &Value, &data, 1, SpixTimeout);
|
||||||
|
|
||||||
/* Check the communication status */
|
/* Check the communication status */
|
||||||
|
|
Loading…
Reference in New Issue