You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.6 KiB

  1. /*
  2. * This program source code file is part of KICAD, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2007 Kicad Developers, see change_log.txt for contributors.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version 2
  9. * of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, you may find one here:
  18. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  19. * or you may search the http://www.gnu.org website for the version 2 license,
  20. * or you may write to the Free Software Foundation, Inc.,
  21. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  22. */
  23. /******************************************************************/
  24. /* class_drc_erc_item.cpp - DRC_ITEM class functions for eeschema */
  25. /******************************************************************/
  26. #include "fctsys.h"
  27. #include "common.h"
  28. #include "class_drc_item.h"
  29. #include "erc.h"
  30. wxString DRC_ITEM::GetErrorText() const
  31. {
  32. switch( m_ErrorCode )
  33. {
  34. case ERCE_UNSPECIFIED:
  35. return wxString( _("ERC err unspecified") );
  36. case ERCE_DUPLICATE_SHEET_NAME:
  37. return wxString( _("Duplicate sheet names within a given sheet") );
  38. case ERCE_PIN_NOT_CONNECTED:
  39. return wxString( _("Pin not connected (and no connect symbol found on this pin)") );
  40. case ERCE_PIN_NOT_DRIVEN:
  41. return wxString( _("Pin connected to some others pins but no pin to drive it") );
  42. case ERCE_PIN_TO_PIN_WARNING:
  43. return wxString( _("Conflict problem between pins. Severity: warning") );
  44. case ERCE_PIN_TO_PIN_ERROR:
  45. return wxString( _("Conflict problem between pins. Severity: error") );
  46. case ERCE_HIERACHICAL_LABEL:
  47. return wxString( _("Mismatch between hierarchical labels and pins sheets"));
  48. case ERCE_NOCONNECT_CONNECTED:
  49. return wxString( _("A no connect symbol is connected to more than 1 pin"));
  50. default:
  51. return wxString( wxT("Unkown.") );
  52. }
  53. }
  54. wxString DRC_ITEM::ShowCoord( const wxPoint& aPos )
  55. {
  56. wxString ret;
  57. wxPoint pos_in_pcb_units = aPos;
  58. pos_in_pcb_units.x *= 10;
  59. pos_in_pcb_units.y *= 10;
  60. ret << pos_in_pcb_units;
  61. return ret;
  62. }