Merge pull request #577 from jaykup26/cheap_focer_09

Support for Cheap FOCer V0.9 (New Method)
This commit is contained in:
Benjamin Vedder 2022-12-07 12:32:00 +01:00 committed by GitHub
commit 48feb2381d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 124 additions and 4 deletions

View File

@ -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_ */

View File

@ -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_ */

View File

@ -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_ */

View File

@ -17,10 +17,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef HW_Cheap_FOCer_2
#define HW_Cheap_FOCer_2
#ifndef HW_CHEAP_FOCER_2_CORE_H_
#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
#define HW_HAS_DRV8301
@ -103,8 +109,12 @@
#define VIN_R2 2200.0
#endif
#ifndef CURRENT_AMP_GAIN
#ifdef CFOC_IS_V09
#define CURRENT_AMP_GAIN 20
#else
#define CURRENT_AMP_GAIN 10
#endif
#endif
#ifndef CURRENT_SHUNT_RES
#define CURRENT_SHUNT_RES 0.0005
#endif
@ -299,4 +309,4 @@
#define HW_LIM_TEMP_FET -40.0, 110.0
#endif /* HW_Cheap_FOCer_2 */
#endif /* HW_CHEAP_FOCER_2_CORE_H_ */

View File

@ -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_ */