mirror of https://github.com/rusefi/bldc.git
Merge pull request #577 from jaykup26/cheap_focer_09
Support for Cheap FOCer V0.9 (New Method)
This commit is contained in:
commit
48feb2381d
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
Copyright 2016 Benjamin Vedder benjamin@vedder.se
|
||||||
|
|
||||||
|
This file is part of the VESC firmware.
|
||||||
|
|
||||||
|
The VESC firmware is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
The VESC firmware is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HW_CHEAP_FOCER_2_H_
|
||||||
|
#define HW_CHEAP_FOCER_2_H_
|
||||||
|
|
||||||
|
#define CFOC_IS_V10
|
||||||
|
|
||||||
|
#include "hw_Cheap_FOCer_2_core.h"
|
||||||
|
|
||||||
|
#endif /* HW_CHEAP_FOCER_2_H_ */
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
Copyright 2016 Benjamin Vedder benjamin@vedder.se
|
||||||
|
|
||||||
|
This file is part of the VESC firmware.
|
||||||
|
|
||||||
|
The VESC firmware is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
The VESC firmware is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HW_CHEAP_FOCER_2_H_
|
||||||
|
#define HW_CHEAP_FOCER_2_H_
|
||||||
|
|
||||||
|
#define CFOC_IS_V09
|
||||||
|
|
||||||
|
#include "hw_Cheap_FOCer_2_core.h"
|
||||||
|
|
||||||
|
#endif /* HW_CHEAP_FOCER_2_H_ */
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
Copyright 2016 Benjamin Vedder benjamin@vedder.se
|
||||||
|
|
||||||
|
This file is part of the VESC firmware.
|
||||||
|
|
||||||
|
The VESC firmware is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
The VESC firmware is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HW_CHEAP_FOCER_2_V09_NO_LIMITS_H_
|
||||||
|
#define HW_CHEAP_FOCER_2_V09_NO_LIMITS_H_
|
||||||
|
|
||||||
|
#define CFOC_IS_V09
|
||||||
|
#define DISABLE_HW_LIMITS
|
||||||
|
|
||||||
|
#include "hw_Cheap_FOCer_2_core.h"
|
||||||
|
|
||||||
|
#endif /* HW_CHEAP_FOCER_2_V09_NO_LIMITS_H_ */
|
|
@ -17,10 +17,16 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HW_Cheap_FOCer_2
|
#ifndef HW_CHEAP_FOCER_2_CORE_H_
|
||||||
#define HW_Cheap_FOCer_2
|
#define HW_CHEAP_FOCER_2_CORE_H_
|
||||||
|
|
||||||
#define HW_NAME "Cheap_FOCer_2"
|
#ifdef CFOC_IS_V09
|
||||||
|
#define HW_NAME "Cheap_FOCer_2_v09"
|
||||||
|
#elif defined(CFOC_IS_V10)
|
||||||
|
#define HW_NAME "Cheap_FOCer_2"
|
||||||
|
#else
|
||||||
|
#error "Must define hardware type"
|
||||||
|
#endif
|
||||||
|
|
||||||
// HW properties
|
// HW properties
|
||||||
#define HW_HAS_DRV8301
|
#define HW_HAS_DRV8301
|
||||||
|
@ -103,8 +109,12 @@
|
||||||
#define VIN_R2 2200.0
|
#define VIN_R2 2200.0
|
||||||
#endif
|
#endif
|
||||||
#ifndef CURRENT_AMP_GAIN
|
#ifndef CURRENT_AMP_GAIN
|
||||||
|
#ifdef CFOC_IS_V09
|
||||||
|
#define CURRENT_AMP_GAIN 20
|
||||||
|
#else
|
||||||
#define CURRENT_AMP_GAIN 10
|
#define CURRENT_AMP_GAIN 10
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#ifndef CURRENT_SHUNT_RES
|
#ifndef CURRENT_SHUNT_RES
|
||||||
#define CURRENT_SHUNT_RES 0.0005
|
#define CURRENT_SHUNT_RES 0.0005
|
||||||
#endif
|
#endif
|
||||||
|
@ -299,4 +309,4 @@
|
||||||
#define HW_LIM_TEMP_FET -40.0, 110.0
|
#define HW_LIM_TEMP_FET -40.0, 110.0
|
||||||
|
|
||||||
|
|
||||||
#endif /* HW_Cheap_FOCer_2 */
|
#endif /* HW_CHEAP_FOCER_2_CORE_H_ */
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
Copyright 2016 Benjamin Vedder benjamin@vedder.se
|
||||||
|
|
||||||
|
This file is part of the VESC firmware.
|
||||||
|
|
||||||
|
The VESC firmware is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
The VESC firmware is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HW_CHEAP_FOCER_2_NO_LIMITS_H_
|
||||||
|
#define HW_CHEAP_FOCER_2_NO_LIMITS_H_
|
||||||
|
|
||||||
|
#define CFOC_IS_V10
|
||||||
|
#define DISABLE_HW_LIMITS
|
||||||
|
|
||||||
|
#include "hw_Cheap_FOCer_2_core.h"
|
||||||
|
|
||||||
|
#endif /* HW_CHEAP_FOCER_2_NO_LIMITS_H_ */
|
Loading…
Reference in New Issue