Skip to content

Commit

Permalink
alpha2
Browse files Browse the repository at this point in the history
  • Loading branch information
murataka committed Apr 4, 2018
1 parent 8f382af commit 837d309
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 483 deletions.
136 changes: 0 additions & 136 deletions watchX/lib/mpu6050/MPU6050_tockn.cpp

This file was deleted.

49 changes: 0 additions & 49 deletions watchX/lib/mpu6050/MPU6050_tockn.h

This file was deleted.

11 changes: 1 addition & 10 deletions watchX/lib/mpu6050/gyroaccel.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
#ifndef GYROACCEL_H
#define GYROACCEL_H


<<<<<<< HEAD:watchX/lib/mpu6050/gyroaccel.h
//#include "watchXmpu6050.h"
=======
#include <MPU6050_tockn.h>
>>>>>>> 7491ed92dc86d1f629b90c364edffced25f63699:watchX/lib/mpu6050/gyroaccel.h





extern int RawValue[6];
#endif
9 changes: 2 additions & 7 deletions watchX/src/batteryui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@
#include "resources.h"
void drawBattery(){

// String s;
// s=batterylevel;
// drawString(0,48,s.c_str(),smallFont);
<<<<<<< HEAD
// if(digitalRead(CHARGE_PIN)==LOW)
=======

if(digitalRead(CHARGE_PIN)==LOW)
>>>>>>> 7491ed92dc86d1f629b90c364edffced25f63699

draw_bitmap( 0, 56, watchXui+(unsigned)(((batterylevel-500)/40)*16), 16, 8, false, 0);

}
19 changes: 2 additions & 17 deletions watchX/src/bluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,10 @@ void error(const __FlashStringHelper*err){

}
unsigned char i;
<<<<<<< HEAD
void handleBle( ){

if(ble->available()){ i=0;

=======
void handleBle(){

if(ble->available()){ i=0;

>>>>>>> 7491ed92dc86d1f629b90c364edffced25f63699
while ( ble->available() )
{

Expand All @@ -33,11 +26,7 @@ if(ble->available()){ i=0;

// functions[sw1Func]= ble_sw1;
// Serial.print((char)c);
<<<<<<< HEAD
///digitalWrite(13,HIGH);
=======
//digitalWrite(13,HIGH);
>>>>>>> 7491ed92dc86d1f629b90c364edffced25f63699

}

Expand All @@ -48,15 +37,11 @@ if(ble->available()){ i=0;
// NanoCanvas c(128,32,buf3);
// c.charF6x8(0, 0,strtmpbuf);
// c.blt(0,0);
<<<<<<< HEAD
//
// functions[uiFunc]=NULL;

gotoBlueTooth( );
//functions[uiFunc]=drawBle;
=======
nextUIFunc=drawBle;
>>>>>>> 7491ed92dc86d1f629b90c364edffced25f63699
}
}
}
Expand All @@ -74,14 +59,14 @@ void ble_connect(){
//error(F("Couldn't find Bluefruit, make sure it's in CoMmanD mode & check wiring?"));
}

/*

if ( FACTORYRESET_ENABLE )
{
if ( ! ble->factoryReset() ){
// error(F("Couldn't factory reset"));
}
}
*/

/* Disable command echo from Bluefruit */
ble->echo(false);
ble->verbose(false); // debug info is a little annoying after this point!
Expand Down
6 changes: 2 additions & 4 deletions watchX/src/bluetooth.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
#define MODE_LED_BEHAVIOUR "MODE"

void drawBle();
<<<<<<< HEAD
void handleBle(bool fromfunction);
=======

void handleBle();
>>>>>>> 7491ed92dc86d1f629b90c364edffced25f63699
void ble_connect();
void ble_sw1();
/* ...hardware SPI, using SCK/MOSI/MISO hardware SPI pins and then user selected CS/IRQ/RST */
Expand Down
32 changes: 1 addition & 31 deletions watchX/src/diag.cpp
Original file line number Diff line number Diff line change
@@ -1,45 +1,15 @@
#include "watchX.h"
#include "diag.h"
#include "oled.h"
<<<<<<< HEAD
#include "temperature.h"
#include "watchXmpu6050.h"

void drawDiag(){
=======

//#include "gyroaccel.h"

//unsigned long last=0;

void drawDiag(){

drawString(16,0,"< DIAGNOSTICS >",smallFont);
/*
if(millis()-last>1000){
batterylevel=readBattery();
last=millis();
}
*/
/*
uint8_t buf[128*8];
NanoCanvas c(128,64,buf);
c.charF6x8(16,0,"< DIAGNOSTICS >" );
>>>>>>> 7491ed92dc86d1f629b90c364edffced25f63699
drawString(16,0,"< DIAGNOSTICS >",smallFont);
char strbuf[10]={temperature/10+48,((int)temperature%10)+48,0};
drawString(0,8,strbuf,smallFont);
strbuf[0]=((((unsigned long)(mpu.readRawAccel().XAxis/100)%100)/10)%10)+48;
strbuf[1]=((unsigned long)(mpu.readRawAccel().XAxis/100)%10)+48 ;
strbuf[2]=0;
if(mpu.readRawAccel().XAxis!=0)
drawString(0,16,strbuf,smallFont);


}
17 changes: 0 additions & 17 deletions watchX/src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ void menusw1( ){
break;
case MENU_GYROCUBE:
// gotoGyroFace();
<<<<<<< HEAD
=======

break;

case MENU_DIAGNOSTIC:
gotoDiagnostic();
>>>>>>> 7491ed92dc86d1f629b90c364edffced25f63699

break;
case MENU_BLUETOOTH:
Expand Down Expand Up @@ -74,10 +66,7 @@ void menusw1( ){
void menusw2( ){

menuspeed=-1;
<<<<<<< HEAD

=======
>>>>>>> 7491ed92dc86d1f629b90c364edffced25f63699

}
void menusw3( ){
Expand All @@ -92,15 +81,9 @@ void menusw3( ){
*/
char menuCap[][15]={"Exit","Stopwatch","Gyrocube","Diagnostic","Bluetooth","Settings"};
void drawMenus(){
<<<<<<< HEAD
///char menuCap[][15]={"Exit","Stopwatch","Gyrocube","Diagnostic","Bluetooth","Settings"};
drawString(26,0,"< MAIN MENU >",smallFont);
drawString(0,56,menuCap[menuindex%(sizeof(menuCap)/15)],smallFont);
=======
char menuCap[][15]={"Exit","Stopwatch","Gyrocube","Diagnostic"};
drawString(26,0,"< MAIN MENU >",smallFont);
drawString(0,56,menuCap[menuindex%4],smallFont);
>>>>>>> 7491ed92dc86d1f629b90c364edffced25f63699

drawLine(48,12,80,12);

Expand Down
Loading

0 comments on commit 837d309

Please sign in to comment.