* cosmetics
This commit is contained in:
parent
4433b5cf5b
commit
06da73c9c3
@ -3,6 +3,7 @@
|
||||
#include "kernel_intern.h"
|
||||
#include "msp430.h"
|
||||
#include "debug.h"
|
||||
#include <msb430-uart1.h>
|
||||
|
||||
volatile static uint32_t __msp430_cpu_speed = MSP430_INITIAL_CPU_SPEED;
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ and the mailinglist (subscription via web site)
|
||||
*/
|
||||
|
||||
//MSB430 core
|
||||
#define MSP430_INITIAL_CPU_SPEED 7372800uL
|
||||
#define MSP430_INITIAL_CPU_SPEED 2457600uL
|
||||
#define MSP430_HAS_DCOR 1
|
||||
#define MSP430_HAS_EXTERNAL_CRYSTAL 0
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Hi Earth\n");
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <sht11.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -16,7 +17,7 @@ void _get_humidity_handler(char* unused) {
|
||||
}
|
||||
else {
|
||||
printf("Relative humidity: %5.2f%% / Temperature compensated humidity; %5.2f%%\n",
|
||||
sht11_val.relhum, sht11_val.relhum_temp);
|
||||
(double) sht11_val.relhum, (double) sht11_val.relhum_temp);
|
||||
}
|
||||
}
|
||||
void _get_temperature_handler(char* unused) {
|
||||
@ -27,7 +28,7 @@ void _get_temperature_handler(char* unused) {
|
||||
printf("Error reading SHT11\n");
|
||||
}
|
||||
else {
|
||||
printf("Temperature: %-6.2f°C\n", sht11_val.temperature);
|
||||
printf("Temperature: %-6.2f°C\n", (double) sht11_val.temperature);
|
||||
}
|
||||
}
|
||||
void _get_weather_handler(char* unused) {
|
||||
@ -39,8 +40,8 @@ void _get_weather_handler(char* unused) {
|
||||
}
|
||||
else {
|
||||
printf("Relative humidity: %5.2f%% / Temperature compensated humidity; %5.2f%% ",
|
||||
sht11_val.relhum, sht11_val.relhum_temp);
|
||||
printf("Temperature: %-6.2f°C\n", sht11_val.temperature);
|
||||
(double) sht11_val.relhum, (double) sht11_val.relhum_temp);
|
||||
printf("Temperature: %-6.2f°C\n", (double) sht11_val.temperature);
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,8 +50,8 @@ void _set_offset_handler(char* offset) {
|
||||
puts("Usage: offset <OFFSET>");
|
||||
}
|
||||
else {
|
||||
sscanf(offset, "offset %f", &sht11_temperature_offset);
|
||||
printf("Temperature offset set to %f\n", sht11_temperature_offset);
|
||||
sht11_temperature_offset = atoi(offset+7);
|
||||
printf("Temperature offset set to %f\n", (double) sht11_temperature_offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user