mirror of
https://github.com/dexterbg/Twizy-Virtual-BMS.git
synced 2025-02-16 14:07:08 +00:00
![Michael Balzer](/assets/img/avatar_default.png)
- Conversion to Arduino library - Added CAN RX callback bmsProcessCanMsg() - Added twizySetError() and error codes - Using ROM strings to save RAM - Configurable debug output level - Added example Template - Added example SimpleBMS - Added setCanFilter() - Added API documentation - Added hardware documentation - Added SEVCON configuration info Version: 0.2 (2017-06-06) - 3MW pulse cycle - Separate states for trickle charging - CAN TX retries - Added bmsTicker() callback Version: 0.1 (2017-06-04) - Initial release
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/**
|
|
* ==========================================================================
|
|
* Twizy Virtual BMS: Configuration
|
|
* ==========================================================================
|
|
*/
|
|
|
|
#ifndef _TwizyVirtualBMS_config_h
|
|
#define _TwizyVirtualBMS_config_h
|
|
|
|
// Serial debug output:
|
|
// Level 0 = none, only output init & error messages
|
|
// Level 1 = log state transitions & CAN statistics
|
|
// Level 2 = log CAN frame dumps (10 second interval)
|
|
#define TWIZY_DEBUG_LEVEL 1
|
|
|
|
// Set to 0 to disable CAN transmissions for testing:
|
|
#define TWIZY_CAN_SEND 1
|
|
|
|
// CAN send timing is normally 10 ms (10.000 us).
|
|
// You may need to lower this if your Arduino is too slow.
|
|
#define TWIZY_CAN_CLOCK_US 10000
|
|
|
|
// Set your MCP clock frequency here:
|
|
#define TWIZY_CAN_MCP_FREQ MCP_16MHZ
|
|
|
|
// Set your SPI CS pin number here:
|
|
#define TWIZY_CAN_CS_PIN 10
|
|
|
|
// If you've connected the CAN module's IRQ pin:
|
|
//#define TWIZY_CAN_IRQ_PIN 2
|
|
|
|
// Set your 3MW control pin here:
|
|
#define TWIZY_3MW_CONTROL_PIN 3
|
|
|
|
#endif // _TwizyVirtualBMS_config_h
|