@opalkelly/frontpanel-react-components 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/FrontPanel/FrontPanel.props.d.ts +4 -4
  4. package/dist/cjs/types/contexts/FrontPanelContext.d.ts +3 -3
  5. package/dist/esm/index.js +1 -1
  6. package/dist/esm/index.js.map +1 -1
  7. package/dist/esm/types/components/FrontPanel/FrontPanel.props.d.ts +4 -4
  8. package/dist/esm/types/contexts/FrontPanelContext.d.ts +3 -3
  9. package/dist/index.d.ts +6 -6
  10. package/package.json +14 -13
  11. package/src/components/FrontPanel/FrontPanel.props.ts +5 -5
  12. package/src/components/FrontPanel/FrontPanel.tsx +2 -2
  13. package/src/components/FrontPanelIndicator/FrontPanelIndicator.tsx +5 -5
  14. package/src/components/FrontPanelNumberDisplay/FrontPanelNumberDisplay.tsx +5 -5
  15. package/src/components/FrontPanelNumberEntry/FrontPanelNumberEntry.stories.tsx +3 -6
  16. package/src/components/FrontPanelNumberEntry/FrontPanelNumberEntry.tsx +12 -12
  17. package/src/components/FrontPanelPushButton/FrontPanelPushButton.tsx +10 -10
  18. package/src/components/FrontPanelRangeSlider/FrontPanelRangeSlider.stories.tsx +4 -6
  19. package/src/components/FrontPanelRangeSlider/FrontPanelRangeSlider.tsx +10 -10
  20. package/src/components/FrontPanelSelectEntry/FrontPanelSelectEntry.stories.tsx +3 -6
  21. package/src/components/FrontPanelSelectEntry/FrontPanelSelectEntryRoot.tsx +12 -12
  22. package/src/components/FrontPanelToggleSwitch/FrontPanelToggleSwitch.tsx +11 -11
  23. package/src/components/FrontPanelTriggerButton/FrontPanelTriggerButton.tsx +5 -5
  24. package/src/contexts/FrontPanelContext.ts +4 -4
  25. package/src/stories/decorators/FrontPanel.decorator.tsx +10 -8
@@ -11,26 +11,28 @@ import type { Decorator } from "@storybook/react";
11
11
 
12
12
  import { FrontPanel } from "../../components";
13
13
 
14
- import { MockFrontPanel, ByteCount } from "@opalkelly/frontpanel-platform-api";
14
+ import { MockFrontPanel, ByteCount, WorkQueue } from "@opalkelly/frontpanel-platform-api";
15
15
 
16
- const mockDevice: MockFrontPanel = new MockFrontPanel(32, 32);
16
+ const mockFPGADataPort: MockFrontPanel = new MockFrontPanel(32, 32);
17
+
18
+ const deviceWorkQueue: WorkQueue = new WorkQueue();
17
19
 
18
20
  const InitializeMockDevice = () => {
19
21
  // Initialize the WireOuts with unique values.
20
- const wireOutBlock = mockDevice.WireOutBlock;
22
+ const wireOutBlock = mockFPGADataPort.WireOutBlock;
21
23
 
22
24
  let byteId: ByteCount = 0;
23
25
 
24
- for (let elementIndex = 0; elementIndex < wireOutBlock.Count; elementIndex++) {
26
+ for (let elementIndex = 0; elementIndex < wireOutBlock.count; elementIndex++) {
25
27
  let elementValue: number = byteId++;
26
28
  for (let byteIndex = 1; byteIndex < 4; byteIndex++) {
27
29
  elementValue |= byteId++ << (8 * byteIndex);
28
30
  }
29
31
 
30
- wireOutBlock.SetValue(
31
- wireOutBlock.BaseAddress + elementIndex,
32
+ wireOutBlock.setValue(
33
+ wireOutBlock.baseAddress + elementIndex,
32
34
  elementValue,
33
- wireOutBlock.Mask
35
+ wireOutBlock.mask
34
36
  );
35
37
  }
36
38
  };
@@ -38,7 +40,7 @@ const InitializeMockDevice = () => {
38
40
  const withFrontPanel: Decorator = (Story) => {
39
41
  InitializeMockDevice();
40
42
  return (
41
- <FrontPanel device={mockDevice}>
43
+ <FrontPanel fpgaDataPort={mockFPGADataPort} workQueue={deviceWorkQueue}>
42
44
  <Story />
43
45
  </FrontPanel>
44
46
  );