phidgets 1.0.1 → 1.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4598e3cecdba6ffe24130930aa2448c014535ff15011c523725119b555c02c37
4
- data.tar.gz: 3042c3545c7ea47497cf70de7f5aff81d1e92db45b45a28b58bdaa3d42809fae
3
+ metadata.gz: f39028057f62ae1139755f0623c3320d551bc702154db131311d1b1fc89699a9
4
+ data.tar.gz: 256b6934ec59ff706a8bc0b7115f1205a661a0d85270d70973a95ec49071bfb5
5
5
  SHA512:
6
- metadata.gz: ba2092518a500734f28f1700446dfa8ede8b4ce2bb575b781745a5b5cee15245fb1e3eb083367f37d6f439ddef9b172821d808bb40615a49917dc7c1b3124231
7
- data.tar.gz: 1a9bfdb51d40bffa58ca6545800ad10794eb1e8bdf52228b7bcd602711fbe226fdcca174559423937f1a09af7ede7876f44030134e8c23da66f1fbde62dd7b44
6
+ metadata.gz: '035979497f611f70f4b6374b7aead2a4e154f4d04ae818a4b7c2e07a392bf203301478fc5aa18d888cad08bbb6fde94757793367712db458d75b5fac13744dff'
7
+ data.tar.gz: 1d6806c07448b5f09d9d226ea749d45c88028b4a2307c99d87937c833f8fc9915fded0a3542eb535a2b853c56504dcf104d09cf75ee57be389e4a3b861a70565
@@ -144,6 +144,7 @@ void Init_phidgets() {
144
144
  rb_define_const(ph_module, "CHSUBCLASS_ENCODER_MODE_SETTABLE", INT2NUM(PHIDCHSUBCLASS_ENCODER_MODE_SETTABLE));
145
145
 
146
146
  rb_define_const(ph_module, "ID_NOTHING", INT2NUM(PHIDID_NOTHING));
147
+ rb_define_const(ph_module, "ID_UNKNOWN", INT2NUM(PHIDID_UNKNOWN));
147
148
  rb_define_const(ph_module, "ID_INTERFACEKIT_4_8_8", INT2NUM(PHIDID_INTERFACEKIT_4_8_8));
148
149
  rb_define_const(ph_module, "ID_1000", INT2NUM(PHIDID_1000));
149
150
  rb_define_const(ph_module, "ID_1001", INT2NUM(PHIDID_1001));
@@ -193,7 +194,6 @@ void Init_phidgets() {
193
194
  rb_define_const(ph_module, "ID_1215__1218", INT2NUM(PHIDID_1215__1218));
194
195
  rb_define_const(ph_module, "ID_1219__1222", INT2NUM(PHIDID_1219__1222));
195
196
  rb_define_const(ph_module, "ID_ADP1000", INT2NUM(PHIDID_ADP1000));
196
- rb_define_const(ph_module, "ID_ADP1001", INT2NUM(PHIDID_ADP1001));
197
197
  rb_define_const(ph_module, "ID_DAQ1000", INT2NUM(PHIDID_DAQ1000));
198
198
  rb_define_const(ph_module, "ID_DAQ1200", INT2NUM(PHIDID_DAQ1200));
199
199
  rb_define_const(ph_module, "ID_DAQ1300", INT2NUM(PHIDID_DAQ1300));
@@ -209,9 +209,7 @@ void Init_phidgets() {
209
209
  rb_define_const(ph_module, "ID_HIN1100", INT2NUM(PHIDID_HIN1100));
210
210
  rb_define_const(ph_module, "ID_HUB0000", INT2NUM(PHIDID_HUB0000));
211
211
  rb_define_const(ph_module, "ID_HUB0001", INT2NUM(PHIDID_HUB0001));
212
- rb_define_const(ph_module, "ID_HUB0002", INT2NUM(PHIDID_HUB0002));
213
212
  rb_define_const(ph_module, "ID_HUB0004", INT2NUM(PHIDID_HUB0004));
214
- rb_define_const(ph_module, "ID_HUB0005", INT2NUM(PHIDID_HUB0005));
215
213
  rb_define_const(ph_module, "ID_HUM1000", INT2NUM(PHIDID_HUM1000));
216
214
  rb_define_const(ph_module, "ID_LCD1100", INT2NUM(PHIDID_LCD1100));
217
215
  rb_define_const(ph_module, "ID_LED1000", INT2NUM(PHIDID_LED1000));
@@ -234,7 +232,6 @@ void Init_phidgets() {
234
232
  rb_define_const(ph_module, "ID_TMP1100", INT2NUM(PHIDID_TMP1100));
235
233
  rb_define_const(ph_module, "ID_TMP1101", INT2NUM(PHIDID_TMP1101));
236
234
  rb_define_const(ph_module, "ID_TMP1200", INT2NUM(PHIDID_TMP1200));
237
- rb_define_const(ph_module, "ID_TMP1300", INT2NUM(PHIDID_TMP1300));
238
235
  rb_define_const(ph_module, "ID_VCP1000", INT2NUM(PHIDID_VCP1000));
239
236
  rb_define_const(ph_module, "ID_VCP1001", INT2NUM(PHIDID_VCP1001));
240
237
  rb_define_const(ph_module, "ID_VCP1002", INT2NUM(PHIDID_VCP1002));
@@ -242,10 +239,10 @@ void Init_phidgets() {
242
239
  rb_define_const(ph_module, "ID_DIGITALOUTPUT_PORT", INT2NUM(PHIDID_DIGITALOUTPUT_PORT));
243
240
  rb_define_const(ph_module, "ID_VOLTAGEINPUT_PORT", INT2NUM(PHIDID_VOLTAGEINPUT_PORT));
244
241
  rb_define_const(ph_module, "ID_VOLTAGERATIOINPUT_PORT", INT2NUM(PHIDID_VOLTAGERATIOINPUT_PORT));
245
- rb_define_const(ph_module, "ID_GENERICUSB", INT2NUM(PHIDID_GENERICUSB));
246
- rb_define_const(ph_module, "ID_GENERICVINT", INT2NUM(PHIDID_GENERICVINT));
247
242
  rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_USB", INT2NUM(PHIDID_FIRMWARE_UPGRADE_USB));
248
243
  rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_STM32F0", INT2NUM(PHIDID_FIRMWARE_UPGRADE_STM32F0));
244
+ rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_STM32F3", INT2NUM(PHIDID_FIRMWARE_UPGRADE_STM32F3));
245
+ rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_STM32G0", INT2NUM(PHIDID_FIRMWARE_UPGRADE_STM32G0));
249
246
  rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_STM8S", INT2NUM(PHIDID_FIRMWARE_UPGRADE_STM8S));
250
247
  rb_define_const(ph_module, "ID_FIRMWARE_UPGRADE_SPI", INT2NUM(PHIDID_FIRMWARE_UPGRADE_SPI));
251
248
  rb_define_const(ph_module, "ID_VCP1100", INT2NUM(PHIDID_VCP1100));
@@ -254,15 +251,20 @@ void Init_phidgets() {
254
251
  rb_define_const(ph_module, "ID_DCC1001", INT2NUM(PHIDID_DCC1001));
255
252
  rb_define_const(ph_module, "ID_DICTIONARY", INT2NUM(PHIDID_DICTIONARY));
256
253
  rb_define_const(ph_module, "ID_STC1001", INT2NUM(PHIDID_STC1001));
257
- rb_define_const(ph_module, "ID_USBSWITCH", INT2NUM(PHIDID_USBSWITCH));
258
254
  rb_define_const(ph_module, "ID_DCC1002", INT2NUM(PHIDID_DCC1002));
259
255
  rb_define_const(ph_module, "ID_STC1002", INT2NUM(PHIDID_STC1002));
260
256
  rb_define_const(ph_module, "ID_STC1003", INT2NUM(PHIDID_STC1003));
261
257
  rb_define_const(ph_module, "ID_DCC1003", INT2NUM(PHIDID_DCC1003));
262
258
  rb_define_const(ph_module, "ID_DST1001", INT2NUM(PHIDID_DST1001));
263
- rb_define_const(ph_module, "ID_CURLOOP", INT2NUM(PHIDID_CURLOOP));
264
259
  rb_define_const(ph_module, "ID_HUB5000", INT2NUM(PHIDID_HUB5000));
265
260
  rb_define_const(ph_module, "ID_RCC0004", INT2NUM(PHIDID_RCC0004));
261
+ rb_define_const(ph_module, "ID_DST1002", INT2NUM(PHIDID_DST1002));
262
+ rb_define_const(ph_module, "ID_HUM1001", INT2NUM(PHIDID_HUM1001));
263
+ rb_define_const(ph_module, "ID_HUM1100", INT2NUM(PHIDID_HUM1100));
264
+ rb_define_const(ph_module, "ID_MOT0100", INT2NUM(PHIDID_MOT0100));
265
+ rb_define_const(ph_module, "ID_MOT0109", INT2NUM(PHIDID_MOT0109));
266
+ rb_define_const(ph_module, "ID_MOT0110", INT2NUM(PHIDID_MOT0110));
267
+ rb_define_const(ph_module, "ID_MOT1102", INT2NUM(PHIDID_MOT1102));
266
268
 
267
269
  rb_define_const(ph_module, "INPUT_MODE_NPN", INT2NUM(INPUT_MODE_NPN));
268
270
  rb_define_const(ph_module, "INPUT_MODE_PNP", INT2NUM(INPUT_MODE_PNP));
@@ -325,6 +327,9 @@ void Init_phidgets() {
325
327
  rb_define_class_under(ph_error, "EndOfFile", ph_error);
326
328
  rb_define_class_under(ph_error, "NotImplemented", ph_error);
327
329
  rb_define_class_under(ph_error, "UnknownError", ph_error);
330
+ rb_define_class_under(ph_error, "FailSafe", ph_error);
331
+ rb_define_class_under(ph_error, "InvalidValueHigh", ph_error);
332
+ rb_define_class_under(ph_error, "InvalidValueLow", ph_error);
328
333
 
329
334
  /*
330
335
  * Document-method: getLibraryVersion
@@ -604,6 +609,15 @@ void ph_raise(int err_code) {
604
609
  case EPHIDGET_EOF:
605
610
  rb_raise(rb_const_get(ph_error, rb_intern("EndOfFile")), "End of File");
606
611
  break;
612
+ case EPHIDGET_FAILSAFE:
613
+ rb_raise(rb_const_get(ph_error, rb_intern("FailSafe")), "Failsafe condition detected");
614
+ break;
615
+ case EPHIDGET_UNKNOWNVALHIGH:
616
+ rb_raise(rb_const_get(ph_error, rb_intern("InvalidValueHigh")), "The value has been measured to be higher than the valid range of the sensor");
617
+ break;
618
+ case EPHIDGET_UNKNOWNVALLOW:
619
+ rb_raise(rb_const_get(ph_error, rb_intern("InvalidValueLow")), "The value has been measured to be lower than the valid range of the sensor");
620
+ break;
607
621
  case EPHIDGET_NOTIMPLEMENTED:
608
622
  rb_raise(rb_const_get(ph_error, rb_intern("NotImplemented")), "This functionality has not been implemented yet");
609
623
  break;
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Phidgets
3
- VERSION = '1.0.1'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phidgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Craig DeHaan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-12 00:00:00.000000000 Z
11
+ date: 2022-10-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem provides a ruby interface to the phidgets library.
14
14
  email:
@@ -161,8 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubyforge_project:
165
- rubygems_version: 2.7.8
164
+ rubygems_version: 3.1.4
166
165
  signing_key:
167
166
  specification_version: 4
168
167
  summary: Phidgets are a set of "plug and play" building blocks for low cost USB sensing