This is a subset of additional lines with the original shown for the diffs.
I made these changes to the ....P-51D\joystick\default.lua
Probably the wrong place to put it as it will be overwritten every time there is an update. But when 2.5.6 goes stable, I will deal with that then.
--- default lines for battery and generator
{down = device_commands.Button_2, cockpit_device_id = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, name = _('Battery'), category = _('Right Switch Panel')},
{down = device_commands.Button_4, cockpit_device_id = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, name = _('Generator'), category = _('Right Switch Panel')},
---Added line for Battery On/Off
{down = device_commands.Button_12, up = device_commands.Button_12, cockpit_device_id = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, value_up = 0.0, name = _('Battery 2-Pos ON/OFF'), category = _('Right Switch Panel')},
--Added line for Generator On/Off
{down = device_commands.Button_13, up = device_commands.Button_13, cockpit_device_id = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, value_up = 0.0, name = _('Generator 2-Pos ON/OFF'), category = _('Right Switch Panel')},