Skip to content

Commit

Permalink
Removed unused hardware variants
Browse files Browse the repository at this point in the history
  • Loading branch information
jsphuebner committed Nov 16, 2021
1 parent 58ef3e9 commit ac16144
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion include/hwdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

typedef enum
{
HW_REV1, HW_REV2, HW_REV3, HW_TESLA, HW_TESLAM3, HW_BLUEPILL, HW_PRIUS, HW_PRIUSMG1
HW_REV1, HW_REV2, HW_REV3, HW_TESLA, HW_BLUEPILL, HW_PRIUS
} HWREV;

extern HWREV hwRev;
Expand Down
4 changes: 2 additions & 2 deletions include/param_prj.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#define VER 5.13.R
#define VER 5.14.R

/* Entries must be ordered as follows:
1. Saveable parameters (id != 0)
Expand Down Expand Up @@ -257,7 +257,7 @@
#define CANSPEEDS "0=250k, 1=500k, 2=800k, 3=1M"
#define CANIOS "1=Cruise, 2=Start, 4=Brake, 8=Fwd, 16=Rev, 32=Bms"
#define CANPERIODS "0=100ms, 1=10ms"
#define HWREVS "0=Rev1, 1=Rev2, 2=Rev3, 3=Tesla, 4=TeslaM3, 5=BluePill, 6=Prius, 7=PriusMG1"
#define HWREVS "0=Rev1, 1=Rev2, 2=Rev3, 3=Tesla, 4=BluePill, 5=Prius"
#define SWAPS "0=None, 1=Currents12, 2=SinCos, 4=PWMOutput13, 8=PWMOutput23"
#define STATUS "0=None, 1=UdcLow, 2=UdcHigh, 4=UdcBelowUdcSw, 8=UdcLim, 16=EmcyStop, 32=MProt, 64=PotPressed, 128=TmpHs, 256=WaitStart"
#define CAT_MOTOR "Motor"
Expand Down
2 changes: 0 additions & 2 deletions src/hwinit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ HWREV io_setup()
break;
case HW_REV2:
case HW_REV3:
case HW_PRIUSMG1:
case HW_TESLAM3:
break;
case HW_PRIUS:
DigIo::emcystop_in.Configure(GPIOC, GPIO7, PinMode::INPUT_PU);
Expand Down
2 changes: 1 addition & 1 deletion src/pwmgeneration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ uint16_t PwmGeneration::TimerSetup(uint16_t deadtime, bool activeLow)

timer_disable_break_automatic_output(PWM_TIMER);

if (hwRev == HW_BLUEPILL || hwRev == HW_PRIUS || hwRev == HW_TESLAM3)
if (hwRev == HW_BLUEPILL || hwRev == HW_PRIUS)
timer_set_break_polarity_low(PWM_TIMER);
else
timer_set_break_polarity_high(PWM_TIMER);
Expand Down
4 changes: 0 additions & 4 deletions src/stm32_sine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,11 @@ static void Ms10Task(void)
PwmGeneration::SetOpmode(opmode);
DigIo::err_out.Clear();
DigIo::prec_out.Clear();
if (hwRev == HW_TESLAM3)
DigIo::vtg_out.Clear();
initWait = -1;
}
else if (initWait == 10)
{
PwmGeneration::SetCurrentOffset(AnaIn::il1.Get(), AnaIn::il2.Get());
if (hwRev == HW_TESLAM3)
DigIo::vtg_out.Set();
initWait--;
}
else if (initWait > 0)
Expand Down
3 changes: 1 addition & 2 deletions src/vehiclecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,8 @@ float VehicleControl::ProcessUdc()
udcFiltered = IIRFILTER(udcFiltered, udcRaw, 2);
udcfp = (udcFiltered - udcofs) / udcgain;

//On M3 pin is used for gate drive enable
//On i3 pin is used as SPI_MOSI
if (hwRev != HW_TESLAM3 && snshs != TempMeas::TEMP_BMWI3HS)
if (snshs != TempMeas::TEMP_BMWI3HS)
{
if (udcfp < udcmin || udcfp > udcmax)
DigIo::vtg_out.Set();
Expand Down

0 comments on commit ac16144

Please sign in to comment.