diff --git a/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2.h b/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2.h new file mode 100644 index 00000000..8b05bc44 --- /dev/null +++ b/hwconf/shaman/Cheap_FOCer_2/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 . + */ + +#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_ */ diff --git a/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_V09.h b/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_V09.h new file mode 100644 index 00000000..fce66d5e --- /dev/null +++ b/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_V09.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 . + */ + +#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_ */ diff --git a/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_V09_no_limits.h b/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_V09_no_limits.h new file mode 100644 index 00000000..02502c3e --- /dev/null +++ b/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_V09_no_limits.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 . + */ + +#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_ */ diff --git a/hwconf/other/hw_Cheap_FOCer_2.c b/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_core.c similarity index 100% rename from hwconf/other/hw_Cheap_FOCer_2.c rename to hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_core.c diff --git a/hwconf/other/hw_Cheap_FOCer_2.h b/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_core.h similarity index 96% rename from hwconf/other/hw_Cheap_FOCer_2.h rename to hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_core.h index dfe8d5de..4984897e 100644 --- a/hwconf/other/hw_Cheap_FOCer_2.h +++ b/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_core.h @@ -17,10 +17,16 @@ along with this program. If not, see . */ -#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_ */ diff --git a/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_no_limits.h b/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_no_limits.h new file mode 100644 index 00000000..561e5094 --- /dev/null +++ b/hwconf/shaman/Cheap_FOCer_2/hw_Cheap_FOCer_2_no_limits.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 . + */ + +#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_ */