Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of workinQM_5thJan_azad by
Diff: ACS.cpp
- Revision:
- 58:c4203e162d12
- Parent:
- 53:459b71b1861c
- Child:
- 59:0fc0bfafaa9f
--- a/ACS.cpp Sun Sep 04 13:08:33 2016 +0000
+++ b/ACS.cpp Sun Sep 04 18:05:31 2016 +0000
@@ -86,12 +86,12 @@
uint8_t ACS_TR_Y_PWM; //*
uint8_t ACS_TR_Z_PWM; //*
//change
-uint16_t ACS_MM_X_COMSN = 0;
-uint16_t ACS_MM_Y_COMSN = 0;
-uint16_t ACS_MG_X_COMSN = 0;
-uint16_t ACS_MG_Y_COMSN = 0;
-uint16_t ACS_MM_Z_COMSN = 0;
-uint16_t ACS_MG_Z_COMSN = 0;
+uint16_t ACS_MM_X_COMSN = 40;
+uint16_t ACS_MM_Y_COMSN = 50;
+uint16_t ACS_MG_X_COMSN = 40;
+uint16_t ACS_MG_Y_COMSN = 50;
+uint16_t ACS_MM_Z_COMSN = 60;
+uint16_t ACS_MG_Z_COMSN = 60;
uint8_t float_to_uint8(float min,float max,float val)
{
@@ -102,6 +102,7 @@
{return 0x00;
}
float div=max-min;div=(255.0/div);val=((val-min)*div);
+ printf("\n\n\n\rthe algo value is %d",val);
return (uint8_t)val;
}
