Skip to content

Instantly share code, notes, and snippets.

View nonninz's full-sized avatar

Francesco Donadon nonninz

View GitHub Profile
@nonninz
nonninz / patch_kicad_pinch_to_zoom.patch
Last active March 4, 2016 04:49
Patch to enable pinch to zoom on KiCad for OSX and swap scrolling and zooming behavior of the mouse wheel. Requires wxWidgets compiled from current master branch.
=== modified file 'common/draw_panel.cpp'
--- common/draw_panel.cpp 2015-03-03 12:41:43 +0000
+++ common/draw_panel.cpp 2015-03-06 17:28:10 +0000
@@ -927,16 +927,16 @@
bool offCenterReq = event.ControlDown() && event.ShiftDown();
offCenterReq = offCenterReq || m_enableZoomNoCenter;
-#if wxMAJOR_VERSION >= 2 && wxMINOR_VERSION >= 9
+//#if wxMAJOR_VERSION >= 2 && wxMINOR_VERSION >= 9
int axis = event.GetWheelAxis();
// -------------------------------------------------------------------------
// Schreibt/liest ein Byte ueber den Hardware SPI Bus
uint8_t spi_putc( uint8_t data )
{
// put byte in send-buffer
SPDR = reverse_byte(data); // Reverse byte flips the bits in the byte to simulate a MSB SPI_mode
// wait until byte was send
while( !( SPSR & (1<<SPIF) ) )