mkorenkov / ipad_charge

charge Apple devices under Ubuntu Linux
GNU General Public License v2.0
258 stars 72 forks source link

Allow up to 2.4 A, AMPS environment variable #47

Closed Tatsh closed 6 years ago

Tatsh commented 6 years ago

This writes messages to syslog (Windows is ignored), and allows the user to specify amperage with the AMPS environment variable, maximum 1900 which makes an iPhone reach 2.4 A at 12 W. Some USB ports (especially cheap hubs) may not like this, but mine are not having issues. USB 2.0 ports cannot exceed 500 mAh, but many violate the standard.

This also makes the default output 2.1 A, and fixes all indents to use real tabs for consistency.

Also adds very strict compiler options as a recommendation for future contributors who are not as experienced.