Mercurial > hg > fxanalyse
comparison FXAnalyse.c @ 180:8faada7e4faf
Remove DDS frequency +10 kHz and -10 kHz buttons
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Fri, 21 Feb 2014 18:42:16 +0100 |
parents | 75e37ba8c417 |
children | 791ca26fee6a |
comparison
equal
deleted
inserted
replaced
179:75e37ba8c417 | 180:8faada7e4faf |
---|---|
1461 break; | 1461 break; |
1462 } | 1462 } |
1463 return 0; | 1463 return 0; |
1464 } | 1464 } |
1465 | 1465 |
1466 int CVICALLBACK CB_OnPlus10k (int panel, int control, int event, | |
1467 void *callbackData, int eventData1, int eventData2) | |
1468 { | |
1469 double Frequency ; | |
1470 | |
1471 switch (event) | |
1472 { | |
1473 case EVENT_COMMIT: | |
1474 switch (control) | |
1475 { | |
1476 case PANEL_PLUS10KDDS1: | |
1477 GetCtrlVal(MainPanel, PANEL_DDS1, &Frequency); | |
1478 Frequency += 10000.0; | |
1479 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, Frequency); | |
1480 SetCtrlVal(MainPanel, PANEL_DDS1, Frequency); | |
1481 break; | |
1482 case PANEL_PLUS10KDDS2: | |
1483 GetCtrlVal(MainPanel, PANEL_DDS2, &Frequency); | |
1484 Frequency += 10000.0; | |
1485 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, Frequency); | |
1486 SetCtrlVal(MainPanel, PANEL_DDS2, Frequency); | |
1487 break; | |
1488 case PANEL_PLUS10KDDS3: | |
1489 GetCtrlVal(MainPanel, PANEL_DDS3, &Frequency); | |
1490 Frequency += 10000.0; | |
1491 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, Frequency); | |
1492 SetCtrlVal(MainPanel, PANEL_DDS3, Frequency); | |
1493 break; | |
1494 case PANEL_PLUS10KDDS4: | |
1495 GetCtrlVal(MainPanel, PANEL_DDS4, &Frequency); | |
1496 Frequency += 10000.0; | |
1497 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 4, Frequency); | |
1498 SetCtrlVal(MainPanel, PANEL_DDS4, Frequency); | |
1499 break; | |
1500 } | |
1501 break; | |
1502 } | |
1503 return 0; | |
1504 } | |
1505 | |
1506 int CVICALLBACK CB_OnMinus10k (int panel, int control, int event, | |
1507 void *callbackData, int eventData1, int eventData2) | |
1508 { | |
1509 double Frequency; | |
1510 | |
1511 switch (event) | |
1512 { | |
1513 case EVENT_COMMIT: | |
1514 switch (control) | |
1515 { | |
1516 case PANEL_MINUS10KDDS1: | |
1517 GetCtrlVal(MainPanel, PANEL_DDS1, &Frequency); | |
1518 Frequency -= 10000.0; | |
1519 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 1, Frequency); | |
1520 SetCtrlVal(MainPanel, PANEL_DDS1, Frequency); | |
1521 break; | |
1522 case PANEL_MINUS10KDDS2: | |
1523 GetCtrlVal(MainPanel, PANEL_DDS2, &Frequency); | |
1524 Frequency -= 10000.0; | |
1525 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 2, Frequency); | |
1526 SetCtrlVal(MainPanel, PANEL_DDS2, Frequency); | |
1527 break; | |
1528 case PANEL_MINUS10KDDS3: | |
1529 GetCtrlVal(MainPanel, PANEL_DDS3, &Frequency); | |
1530 Frequency -= 10000.0; | |
1531 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 3, Frequency); | |
1532 SetCtrlVal(MainPanel, PANEL_DDS3, Frequency); | |
1533 break; | |
1534 case PANEL_MINUS10KDDS4: | |
1535 GetCtrlVal(MainPanel, PANEL_DDS4, &Frequency); | |
1536 Frequency -= 10000.0; | |
1537 DDS4xAD9912_SetFrequency(&DDS4xAD9912, 4, Frequency); | |
1538 SetCtrlVal(MainPanel, PANEL_DDS4, Frequency); | |
1539 break; | |
1540 } | |
1541 break; | |
1542 } | |
1543 return 0; | |
1544 } | |
1545 | |
1546 int CVICALLBACK CB_OnAcceptN (int panel, int control, int event, | 1466 int CVICALLBACK CB_OnAcceptN (int panel, int control, int event, |
1547 void *callbackData, int eventData1, int eventData2) | 1467 void *callbackData, int eventData1, int eventData2) |
1548 { | 1468 { |
1549 int measure; | 1469 int measure; |
1550 | 1470 |