[MOD]: Enhancement

This commit is contained in:
but0n 2016-09-22 20:59:22 +08:00
parent 8be9556960
commit 0716b65a3e
2 changed files with 8 additions and 4 deletions

View File

@ -8,7 +8,8 @@ void delay_us(volatile unsigned int nus) {
}
void IIC_init() {
RCC->APB2ENR |= 1<<3; //GPIOB enable
// RCC->APB2ENR |= 1<<3; //GPIOB enable
RCC->APB2ENR |= RCC_APB2RSTR_IOPBRST;
GPIOB->CRH &= 0x0F0FFFFF; //reset B13 & B15
GPIOB->CRH |= 0x70700000; //Set B13 & B15 b0111
GPIOB->ODR |= 5<<5;

View File

@ -98,17 +98,21 @@ void Comput(SixAxis cache) {
g_Yaw = atan2(2 * (g_q1 * g_q2 + g_q0 * g_q3), g_q0*g_q0 + g_q1*g_q1 - g_q2*g_q2 - g_q3*g_q3) * 57.3;
}
#define DEBUG_WIFI
//#define DEBUG_WIFI
#define DEBUG_MPU6050_EULER //Do not comment this, even not work
int main() {
SixAxis sourceData;
wifi_Config();
while(0) {
#ifdef DEBUG_WIFI
while(1) {
wifi_sendCmd("AT+CIPSEND=0,20");
delay(50);
wifi_sendCmd("<html>aki<br></html>");
delay(1000);
}
#endif
initLED();
@ -119,7 +123,6 @@ int main() {
MPU_init();
SixAxis sourceData;
while(1) {