-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'CY_V2.0.2_imaxb6_ori_increase_watt'
Conflicts: .gitignore
- Loading branch information
Showing
16 changed files
with
171 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ CMakeFiles/ | |
Makefile | ||
cmake_install.cmake | ||
src/core/Version.h | ||
build_ubuntu.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cheali-charger.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Version.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.cmake | ||
*.bin | ||
*.hex | ||
*.eep | ||
*.size | ||
Makefile | ||
CMakeFiles | ||
cheali-charger-*atmega32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/hardware/atmega32/targets/imaxB6-original-chihying/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
set(SOURCE_FILES | ||
defaultCalibration.cpp | ||
HardwareConfig.h | ||
) | ||
|
||
CHEALI_HARDWARE(imaxB6-original-chihying) | ||
CHEALI_CPU(atmega32) | ||
CHEALI_GENERIC_CHARGER(50W) | ||
|
||
CHEALI_GENERATE_AVR_EXEC() |
42 changes: 42 additions & 0 deletions
42
src/hardware/atmega32/targets/imaxB6-original-chihying/HardwareConfig.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
cheali-charger - open source firmware for a variety of LiPo chargers | ||
Copyright (C) 2013 Paweł Stawicki. All right reserved. | ||
This program 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. | ||
This program 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 HARDWARE_CONFIG_H_ | ||
#define HARDWARE_CONFIG_H_ | ||
|
||
#include "GlobalConfig.h" | ||
#include "HardwareConfigGeneric.h" | ||
#include "imaxB6-pins.h" | ||
|
||
#define MAX_CHARGE_V ANALOG_VOLT(27.000) | ||
#define MAX_CHARGE_I ANALOG_AMP(10.000) | ||
#define MAX_CHARGE_P ANALOG_WATT(80.000) | ||
|
||
#define MAX_DISCHARGE_P ANALOG_WATT(8.000) | ||
#define MAX_DISCHARGE_I ANALOG_AMP(2.000) | ||
|
||
//default value in settings | ||
#define SETTINGS_MAX_CHARGE_I ANALOG_AMP(5.000) | ||
#define SETTINGS_MAX_DISCHARGE_I ANALOG_AMP(1.000) | ||
#define SETTINGS_MAX_CHARGE_P ANALOG_WATT(50.000) | ||
#define SETTINGS_MAX_DISCHARGE_P ANALOG_WATT(5.000) | ||
|
||
#define SMPS_UPPERBOUND_VALUE 65000 | ||
#define DISCHARGER_UPPERBOUND_VALUE TIMER1_PRECISION_PERIOD | ||
|
||
|
||
#endif /* HARDWARE_CONFIG_H_ */ |
51 changes: 51 additions & 0 deletions
51
src/hardware/atmega32/targets/imaxB6-original-chihying/defaultCalibration.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
cheali-charger - open source firmware for a variety of LiPo chargers | ||
Copyright (C) 2013 Paweł Stawicki. All right reserved. | ||
This program 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. | ||
This program 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/>. | ||
*/ | ||
|
||
#include "AnalogInputsPrivate.h" | ||
#include "memory.h" | ||
|
||
const AnalogInputs::DefaultValues AnalogInputs::inputsP_[AnalogInputs::PHYSICAL_INPUTS] PROGMEM = { | ||
{{0, 0}, {55102, 25141}}, //Vout | ||
{{0, 0}, {26613, 12518}}, //VreversePolarity | ||
{{775, 50}, {11080, 1000}}, //Ismps | ||
{{2017, 50}, {11971, 300}}, //Idischarge | ||
|
||
{{0, 0}, {0, 0}}, //VoutMux | ||
{{0, 0}, {0, 0}}, //Tintern | ||
{{0, 0}, {48061, 14047}}, //Vin | ||
{{5884, 2280}, {0, 0}}, //Textern | ||
|
||
{{0, 0}, {48963, 3752}}, //Vb0_pin | ||
{{0, 0}, {55048, 4187}}, //Vb1_pin | ||
{{0, 0}, {56248, 8378}}, //Vb2_pin | ||
{{0, 0}, {56067, 4191}}, //Vb3_pin | ||
|
||
{{0, 0}, {54784, 4193}}, //Vb4_pin | ||
{{0, 0}, {55070, 4196}}, //Vb5_pin | ||
{{0, 0}, {55808, 4193}}, //Vb6_pin | ||
|
||
#if MAX_BANANCE_CELLS > 6 | ||
{{0, 0}, {50752, ANALOG_VOLT(3.865)}}, //Vb7_pin | ||
{{0, 0}, {51008, ANALOG_VOLT(3.885)}}, //Vb8_pin | ||
#endif | ||
//1-1 correlation | ||
{{780, 50}, {11080, 1000}}, //IsmpsSet | ||
{{730, 50}, {4410, 300}}, //IdischargeSet | ||
}; | ||
|
||
|
29 changes: 29 additions & 0 deletions
29
src/hardware/atmega32/targets/imaxB6-original-chihying/progUSBasp.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
#maybe you should change this: | ||
#TTY=-P/dev/ttyUSB0 | ||
TTY= | ||
PROGRAMMER=usbasp | ||
#--- | ||
|
||
PARTNO=atmega32 | ||
|
||
HEX=`ls *.hex | head -1` | ||
echo "HEX=$HEX" | ||
echo "TTY=$TTY" | ||
|
||
if [ "$1" != "--no-backup" ]; then | ||
NOW=`date +"%F_%T"` | ||
DIR="backup/$NOW" | ||
echo "creating buckup: $DIR" | ||
mkdir -p $DIR | ||
cd $DIR | ||
avrdude -p$PARTNO -c$PROGRAMMER $TTY -Uflash:r:flash.bin:r -Ulfuse:r:lfuse.bin:r -Uhfuse:r:hfuse.bin:r -Ueeprom:r:eeprom.bin:r | ||
cd - | ||
fi | ||
|
||
if [ -f "$HEX" ]; then | ||
avrdude -p$PARTNO -c$PROGRAMMER $TTY -Uflash:w:$HEX:a | ||
fi |