1. 25 May, 2012 1 commit
  2. 24 May, 2012 1 commit
  3. 03 May, 2012 1 commit
  4. 19 Apr, 2012 1 commit
    • Dick Hollenbeck's avatar
      // Dick Hollenbeck's KiROUND R&D · c24863c0
      Dick Hollenbeck authored
      // This provides better project control over rounding to int from double
      // than wxRound() did.  This scheme provides better logging in Debug builds
      // and it provides for compile time calculation of constants.
      
      
      #include <stdio.h>
      #include <assert.h>
      #include <limits.h>
      
      //-----<KiROUND KIT>------------------------------------------------------------
      
      /**
       * KiROUND
       * rounds a floating point number to an int using
       * "round halfway cases away from zero".
       * In Debug build an assert fires if will not fit into an int.
       */
      
      #if defined( DEBUG )
      
      // DEBUG: a macro to capture line and file, then calls this inline
      
      static inline int KiRound( double v, int line, const char* filename )
      {
          v = v < 0 ? v - 0.5 : v + 0.5;
          if( v > INT_MAX + 0.5 )
          {
              printf( "%s: in file %s on line %d, val: %.16g too ' > 0 ' for int\n", __FUNCTION__, filename, line, v );
          }
          else if( v < INT_MIN - 0.5 )
          {
              printf( "%s: in file %s on line %d, val: %.16g too ' < 0 ' for int\n", __FUNCTION__, filename, line, v );
          }
          return int( v );
      }
      
      #define KiROUND( v )    KiRound( v, __LINE__, __FILE__ )
      
      #else
      
      // RELEASE: a macro so compile can pre-compute constants.
      
      #define KiROUND( v )  int( (v) < 0 ? (v) - 0.5 : (v) + 0.5 )
      
      #endif
      
      
      //-----</KiROUND KIT>-----------------------------------------------------------
      
      // Only a macro is compile time calculated, an inline function causes a static constructor
      // in a situation like this.
      // Therefore the Release build is best done with a MACRO not an inline function.
      int Computed = KiROUND( 14.3 * 8 );
      
      
      int main( int argc, char** argv )
      {
          for( double d = double(INT_MAX)-1;  d < double(INT_MAX)+8;  d += 2.0 )
          {
              int i = KiROUND( d );
      
              printf( "t: %d  %.16g\n", i, d );
          }
      
          return 0;
      }
      c24863c0
  5. 13 Apr, 2012 1 commit
    • Wayne Stambaugh's avatar
      More internal unit improvements. · 57d75a75
      Wayne Stambaugh authored
      * Move all convert from internal to user units functions into separate file.
      * Remove internal units parameter from all moved conversion functions.
      * Revise all source code that calls the moved conversion functions.
      * Compile these conversion routines separately for the appropriate pcb or
        schematic internal units.
      * Move internal units specific status bar update code into the appropriate
        application for updating the status bar.
      * Move millimeter user units rounding function to common.cpp.
      57d75a75
  6. 19 Mar, 2012 1 commit
  7. 17 Mar, 2012 1 commit
  8. 15 Mar, 2012 1 commit
  9. 26 Feb, 2012 1 commit
    • Wayne Stambaugh's avatar
      Eeschema object list and other minor improvements. · aaa1cc3e
      Wayne Stambaugh authored
      * Convert Eeschema from manually linked list to DLIST for storing
        SCH_ITEM objects.
      * Add helper functions to SCH_SCREEN for appending list of SCH_ITEM
        objects.
      * Fix bug in wire editing code for accurate undo/redo behavior.
      * Add member to DLIST to append another DLIST.
      * Other minor code cleaning.
      aaa1cc3e
  10. 23 Jan, 2012 1 commit
  11. 29 Dec, 2011 1 commit
  12. 07 Dec, 2011 1 commit
  13. 06 Dec, 2011 1 commit
  14. 19 Oct, 2011 1 commit
    • Wayne Stambaugh's avatar
      Eeschema schematic item move code unification. · 6a4e8aa9
      Wayne Stambaugh authored
      * Add get and set position methods to all schematic items.
      * Encapsulate schematic item position members.
      * Add swap data method to schematic items that lacked one.
      * Remove global swap data function used by undo and redo functions.
      * Unify as many schematic move methods as possible.
      * Remove unnecessary place schematic item methods.
      * All schematic items are now moved in the same event handler.
      * Fixed bug in hierarchical sheet get menu item string method.
      * Make no connect and junction items movable, fixes lp:804048
      6a4e8aa9
  15. 11 Oct, 2011 1 commit
    • Wayne Stambaugh's avatar
      Eeschema net list object generation improvements. · 2ba19844
      Wayne Stambaugh authored
      * Define function to allow schematic objects to create their own net list
        objects.
      * Add net list object creation functions to schematic line, junction, and
        no connect objects.
      * Add license statements to all modified files that required one.
      2ba19844
  16. 30 Sep, 2011 1 commit
    • Wayne Stambaugh's avatar
      Application name capitalization fixes. · 4b853ded
      Wayne Stambaugh authored
      * Correct all user strings and comments for the correct capitalization of
        application names according to JP.  They are KiCad, Pcbnew, CvPcb,
        Eeschema, and GerbView.
      * Add a note the the user interface policy about the correct capitalization.
      4b853ded
  17. 29 Aug, 2011 1 commit
  18. 17 Jun, 2011 1 commit
    • Wayne Stambaugh's avatar
      Schematic object plot code refactoring and CMake required version changes. · c1802037
      Wayne Stambaugh authored
      * Change the minimum required CMake version to 2.6.4 for all build platforms
        except Windows and OSX.
      * Move all schematic plot code from plot.cpp into the appropriate schematic
        objects.
      * Create SCH_SCREEN plot method to plot all objects in the schematic
        screen.
      * Delete plot.cpp and remove it from the CMakeList file.
      c1802037
  19. 29 Mar, 2011 1 commit
  20. 26 Mar, 2011 1 commit
  21. 28 Feb, 2011 1 commit
  22. 25 Jan, 2011 1 commit
  23. 21 Jan, 2011 1 commit
    • Wayne Stambaugh's avatar
      EESchema code refactoring and coding policy naming fixes. · 73e38ce9
      Wayne Stambaugh authored
      * Move schematic wire and bus break code into schematic screen object.
      * Move schematic test for dangling ends into schematic screen object.
      * Remove left over debugging output in schematic screen object.
      * Remove unused file eeschema/cleanup.cpp.
      * Fix bug in schematic line object hit test algorithm.
      * Fix a string concatenation compile error added in r2752.
      * Rename class WinEDA_BasicFrame to EDA_BASE_FRAME.
      * Rename class WinEDA_DrawFrame to EDA_DRAW_FRAME.
      * Rename class WinEDA_DrawPanel to EDA_DRAW_PANEL.
      73e38ce9
  24. 20 Jan, 2011 1 commit
  25. 07 Jan, 2011 1 commit
    • Wayne Stambaugh's avatar
      EESchema block object select improvements and other minor fixes. · 7e1745da
      Wayne Stambaugh authored
      * Move schematic select block from global variable to SCH_EDIT_FRAME.
      * Remove redundant schematic drawing code for eeredraw.cpp.
      * Move block select code into SCH_SCREEN object.
      * Simpilify block item select code.
      * Fix bug in SCH_LINE selection state test.
      * Add test to schematic objects for connectability.
      * Make copy block items function a private method in SCH_EDIT_FRAME.
      7e1745da
  26. 21 Dec, 2010 1 commit