[Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-04-20 Thread noreply
The proposal to merge lp:~alisonken1/openlp/pjlink2-q into lp:openlp has been 
updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/343669
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-04-20 Thread Tim Bentley
Review: Approve


-- 
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/343669
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-04-20 Thread Phill
Review: Approve

Looks good to me. Thanks!
-- 
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/343669
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-04-20 Thread Ken Roberts
Ken Roberts has proposed merging lp:~alisonken1/openlp/pjlink2-q into lp:openlp.

Commit message:
PJLink2 update Q

Requested reviews:
  Tim Bentley (trb143)
  Phill (phill-ridout)

For more details, see:
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/343669

PJLink2 update Q



lp:~alisonken1/openlp/pjlink2-q (revision 2818)
https://ci.openlp.io/job/Branch-01-Pull/2506/  [SUCCESS]
https://ci.openlp.io/job/Branch-02a-Linux-Tests/2407/  [SUCCESS]
https://ci.openlp.io/job/Branch-02b-macOS-Tests/193/   [FAILURE]
https://ci.openlp.io/job/Branch-03a-Build-Source/105/  [SUCCESS]
https://ci.openlp.io/job/Branch-03b-Build-macOS/98/[SUCCESS]
https://ci.openlp.io/job/Branch-04a-Code-Analysis/1567/[SUCCESS]
https://ci.openlp.io/job/Branch-04b-Test-Coverage/1380/[SUCCESS]
https://ci.openlp.io/job/Branch-05-AppVeyor-Tests/309/ [FAILURE]

--

- Fix test_projector_db:TestProjectorDBUpdate segfault by
creating self.main_window steps
- Pep8 on openlp/core/common/__init__.get_local_ip4()
- Collapse import from projector.constants from line-per-item to 
multi-items-per-line
- Change pjlink_functions to include class version for projector instance in 
command
- Set projector.editform to only allow editing IP address field for new entry 
only (used as db key entry)
- Collapse projector.manager imports from entry-per-line to compact import
- projector.pjlink:
- Merge pjlink_functions_udp into pjlink_functions
- Change pjlink_functions to add instance-specific version to commands
- Fix command checks to changed pjlink_funcions
- Update process_clss to update PJLink version in pjlink_functions
- Update reset_information to update PJLink version in pjlink_functions
- renamed test_projectorsourceform.py to test_projector_sourceform.py
- renamed test_projectoreditform.py to test_projector_editform.py
- Fix projector tests
- Fix list creation in constants (remove unneeded comma)
- Rename editform ip_text_show label to ip_text_label
- Refactor editform IP address check
- Add TODO on commented code block for breaking incoming packet into parts

-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/projectors/constants.py'
--- openlp/core/projectors/constants.py	2018-01-03 00:35:14 +
+++ openlp/core/projectors/constants.py	2018-04-20 06:16:23 +
@@ -154,110 +154,137 @@
 S_INFO
 ]
 
-# NOTE: Changed format to account for some commands are both class 1 and 2
+# NOTE: Changed format to account for some commands are both class 1 and 2.
+#   Make sure the sequence of 'version' is lowest-to-highest.
 PJLINK_VALID_CMD = {
-'ACKN': {'version': ['2', ],
+'ACKN': {'version': ['2'],
+ 'default': '2',
  'description': translate('OpenLP.PJLinkConstants',
   'Acknowledge a PJLink SRCH command - returns MAC address.')
  },
-'AVMT': {'version': ['1', ],
+'AVMT': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Blank/unblank video and/or mute audio.')
  },
-'CLSS': {'version': ['1', ],
+'CLSS': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query projector PJLink class support.')
  },
 'ERST': {'version': ['1', '2'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query error status from projector. '
   'Returns fan/lamp/temp/cover/filter/other error status.')
  },
-'FILT': {'version': ['2', ],
+'FILT': {'version': ['2'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query number of hours on filter.')
  },
-'FREZ': {'version': ['2', ],
+'FREZ': {'version': ['2'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Freeze or unfreeze current image being projected.')
  },
-'INF1': {'version': ['1', ],
+'INF1': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query projector manufacturer name.')
  },
-'INF2': {'version': ['1', ],
+'INF2': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',

[Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-04-20 Thread Ken Roberts
The proposal to merge lp:~alisonken1/openlp/pjlink2-q into lp:openlp has been 
updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/343668
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-04-19 Thread Ken Roberts
Ken Roberts has proposed merging lp:~alisonken1/openlp/pjlink2-q into lp:openlp.

Commit message:
PJLink2 update Q

Requested reviews:
  Phill (phill-ridout)
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/343668

PJLink2 update Q


lp:~alisonken1/openlp/pjlink2-q (revision 2818)
https://ci.openlp.io/job/Branch-01-Pull/2504/  [SUCCESS]
https://ci.openlp.io/job/Branch-02a-Linux-Tests/2405/  [SUCCESS]
https://ci.openlp.io/job/Branch-02b-macOS-Tests/191/   [FAILURE]
https://ci.openlp.io/job/Branch-03a-Build-Source/103/  [SUCCESS]
https://ci.openlp.io/job/Branch-03b-Build-macOS/96/[SUCCESS]
https://ci.openlp.io/job/Branch-04a-Code-Analysis/1565/[FAILURE]
https://ci.openlp.io/job/Branch-04b-Test-Coverage/1378/[SUCCESS]
https://ci.openlp.io/job/Branch-05-AppVeyor-Tests/309/ 
[WAITING]Traceback
--

- Fix test_projector_db:TestProjectorDBUpdate segfault by
creating self.main_window steps
- Pep8 on openlp/core/common/__init__.get_local_ip4()
- Collapse import from projector.constants from line-per-item to 
multi-items-per-line
- Change pjlink_functions to include class version for projector instance in 
command
- Set projector.editform to only allow editing IP address field for new entry 
only (used as db key entry)
- Collapse projector.manager imports from entry-per-line to compact import
- projector.pjlink:
- Merge pjlink_functions_udp into pjlink_functions
- Change pjlink_functions to add instance-specific version to commands
- Fix command checks to changed pjlink_funcions
- Update process_clss to update PJLink version in pjlink_functions
- Update reset_information to update PJLink version in pjlink_functions
- renamed test_projectorsourceform.py to test_projector_sourceform.py
- renamed test_projectoreditform.py to test_projector_editform.py
- Fix projector tests
- Fix list creation in constants (remove unneeded comma)
- Rename editform ip_text_show label to ip_text_label
- Refactor editform IP address check
- Add TODO on commented code block for breaking incoming packet into parts

-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/projectors/constants.py'
--- openlp/core/projectors/constants.py	2018-01-03 00:35:14 +
+++ openlp/core/projectors/constants.py	2018-04-20 05:55:41 +
@@ -154,110 +154,137 @@
 S_INFO
 ]
 
-# NOTE: Changed format to account for some commands are both class 1 and 2
+# NOTE: Changed format to account for some commands are both class 1 and 2.
+#   Make sure the sequence of 'version' is lowest-to-highest.
 PJLINK_VALID_CMD = {
-'ACKN': {'version': ['2', ],
+'ACKN': {'version': ['2'],
+ 'default': '2',
  'description': translate('OpenLP.PJLinkConstants',
   'Acknowledge a PJLink SRCH command - returns MAC address.')
  },
-'AVMT': {'version': ['1', ],
+'AVMT': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Blank/unblank video and/or mute audio.')
  },
-'CLSS': {'version': ['1', ],
+'CLSS': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query projector PJLink class support.')
  },
 'ERST': {'version': ['1', '2'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query error status from projector. '
   'Returns fan/lamp/temp/cover/filter/other error status.')
  },
-'FILT': {'version': ['2', ],
+'FILT': {'version': ['2'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query number of hours on filter.')
  },
-'FREZ': {'version': ['2', ],
+'FREZ': {'version': ['2'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Freeze or unfreeze current image being projected.')
  },
-'INF1': {'version': ['1', ],
+'INF1': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query projector manufacturer name.')
  },
-'INF2': {'version': ['1', ],
+'INF2': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',

[Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-04-19 Thread Ken Roberts
The proposal to merge lp:~alisonken1/openlp/pjlink2-q into lp:openlp has been 
updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/342022
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-04-18 Thread Phill
Review: Needs Fixing

A few issues / questions. See in line.

Diff comments:

> 
> === modified file 'openlp/core/projectors/editform.py'
> --- openlp/core/projectors/editform.py2017-12-29 09:15:48 +
> +++ openlp/core/projectors/editform.py2018-03-24 08:24:22 +
> @@ -58,10 +58,15 @@
>  # IP Address
>  self.ip_label = QtWidgets.QLabel(edit_projector_dialog)
>  self.ip_label.setObjectName('projector_edit_ip_label')
> -self.ip_text = QtWidgets.QLineEdit(edit_projector_dialog)
> -self.ip_text.setObjectName('projector_edit_ip_text')
> +self.ip_text_edit = QtWidgets.QLineEdit(edit_projector_dialog)
> +self.ip_text_edit.setObjectName('projector_edit_ip_text')
> +self.ip_text_show = QtWidgets.QLabel(edit_projector_dialog)

append _label to the name please

> +self.ip_text_show.setObjectName('projector_show_ip_text')
>  self.dialog_layout.addWidget(self.ip_label, 0, 0)
> -self.dialog_layout.addWidget(self.ip_text, 0, 1)
> +# For new projector, use edit widget
> +self.dialog_layout.addWidget(self.ip_text_edit, 0, 1)
> +# For edit projector, use show widget
> +self.dialog_layout.addWidget(self.ip_text_show, 0, 1)
>  # Port number
>  self.port_label = QtWidgets.QLabel(edit_projector_dialog)
>  self.port_label.setObjectName('projector_edit_ip_label')
> @@ -187,7 +198,8 @@
>   
>record=record.id)))
>  valid = False
>  return
> -adx = self.ip_text.text()
> +if self.new_projector:

'adx' will not be defined if this is False

> +adx = self.ip_text_edit.text()
>  valid = verify_ip_address(adx)
>  if valid:
>  ip = self.projectordb.get_projector_by_ip(adx)
> 
> === modified file 'openlp/core/projectors/pjlink.py'
> --- openlp/core/projectors/pjlink.py  2018-02-11 11:42:13 +
> +++ openlp/core/projectors/pjlink.py  2018-03-24 08:24:22 +
> @@ -973,45 +975,60 @@
>  ip = self.ip
>  log.debug('({ip}) get_data(ip="{ip_in}" 
> buffer="{buff}"'.format(ip=self.entry.name, ip_in=ip, buff=buff))
>  # NOTE: Class2 has changed to some values being UTF-8
> -data_in = decode(buff, 'utf-8')
> +if type(buff) is bytes:

I think isinstance(buff, bytes) is preferred.

> +data_in = decode(buff, 'utf-8')
> +else:
> +data_in = buff
>  data = data_in.strip()
> +# log.debug('({ip}) get_data() 
> data_in="{data}"'.format(ip=self.entry.name, data=data_in))

Is this temporary?

>  # Initial packet checks
>  if (len(data) < 7):
>  self._trash_buffer(msg='get_data(): Invalid packet - length')
>  return self.receive_data_signal()
>  elif len(data) > self.max_size:
> -self._trash_buffer(msg='get_data(): Invalid packet - too long')
> +self._trash_buffer(msg='get_data(): Invalid packet - too long 
> ({length} bytes)'.format(length=len(data)))
>  return self.receive_data_signal()
>  elif not data.startswith(PJLINK_PREFIX):
>  self._trash_buffer(msg='get_data(): Invalid packet - PJLink 
> prefix missing')
>  return self.receive_data_signal()
> -elif '=' not in data:
> +elif data[6] != '=':
>  self._trash_buffer(msg='get_data(): Invalid reply - Does not 
> have "="')
>  return self.receive_data_signal()
>  log.debug('({ip}) get_data(): Checking new data 
> "{data}"'.format(ip=self.entry.name, data=data))
>  header, data = data.split('=')
> +log.debug('({ip}) get_data() header="{header}" 
> data="{data}"'.format(ip=self.entry.name,
> + 
> header=header, data=data))
>  # At this point, the header should contain:
>  #   "PV"
>  #   Where:
>  #   P = PJLINK_PREFIX
>  #   V = PJLink class or version
>  #   C = PJLink command
> +version, cmd = header[1], header[2:].upper()
> +log.debug('({ip}) get_data() version="{version}" 
> cmd="{cmd}"'.format(ip=self.entry.name,
> + 
> version=version, cmd=cmd))
> +'''

Whats happening with this code here to .

>  try:
>  version, cmd = header[1], header[2:].upper()
> +log.debug('({ip}) get_data() version="{version}" 
> cmd="{cmd}"'.format(ip=self.entry.name,
> + 
> version=version, cmd=cmd))
>  except ValueError as e:
>  self.change_status(E_INVALID_DATA)
>  log.warning('({ip}) get_data(): Received data: 
> 

Re: [Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-03-24 Thread Tim Bentley
Review: Approve

Looks OK but projectors is not my strong point.
-- 
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/342022
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-03-24 Thread Ken Roberts
Ken Roberts has proposed merging lp:~alisonken1/openlp/pjlink2-q into lp:openlp.

Commit message:
PJLink2 update Q

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/342022

PJLink2 update Q


lp:~alisonken1/openlp/pjlink2-q (revision 2813)
https://ci.openlp.io/job/Branch-01-Pull/2482/  [SUCCESS]
https://ci.openlp.io/job/Branch-02a-Linux-Tests/2383/  [SUCCESS]
https://ci.openlp.io/job/Branch-02b-macOS-Tests/170/   [FAILURE]
https://ci.openlp.io/job/Branch-03a-Build-Source/92/   [SUCCESS]
https://ci.openlp.io/job/Branch-03b-Build-macOS/85/[SUCCESS]
https://ci.openlp.io/job/Branch-04a-Code-Analysis/1554/[SUCCESS]
https://ci.openlp.io/job/Branch-04b-Test-Coverage/1367/[SUCCESS]
https://ci.openlp.io/job/Branch-05-AppVeyor-Tests/299/ [FAILURE]

- Fix test_projector_db:TestProjectorDBUpdate segfault by
creating self.main_window steps
- Pep8 on openlp/core/common/__init__.get_local_ip4()
- Collapse import from projector.constants from line-per-item to 
multi-items-per-line
- Change pjlink_functions to include class version for projector instance in 
command
- Set projector.editform to only allow editing IP address field for new entry 
only (used as db key entry)
- Collapse projector.manager imports from entry-per-line to compact import
- projector.pjlink:
- Merge pjlink_functions_udp into pjlink_functions
- Change pjlink_functions to add instance-specific version to commands
- Fix command checks to changed pjlink_funcions
- Update process_clss to update PJLink version in pjlink_functions
- Update reset_information to update PJLink version in pjlink_functions
- renamed test_projectorsourceform.py to test_projector_sourceform.py
- renamed test_projectoreditform.py to test_projector_editform.py
- Fix projector tests
- Fix list creation in constants (remove unneeded comma)

-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/__init__.py'
=== modified file 'openlp/core/projectors/constants.py'
--- openlp/core/projectors/constants.py	2018-01-03 00:35:14 +
+++ openlp/core/projectors/constants.py	2018-03-24 08:24:22 +
@@ -154,110 +154,137 @@
 S_INFO
 ]
 
-# NOTE: Changed format to account for some commands are both class 1 and 2
+# NOTE: Changed format to account for some commands are both class 1 and 2.
+#   Make sure the sequence of 'version' is lowest-to-highest.
 PJLINK_VALID_CMD = {
-'ACKN': {'version': ['2', ],
+'ACKN': {'version': ['2'],
+ 'default': '2',
  'description': translate('OpenLP.PJLinkConstants',
   'Acknowledge a PJLink SRCH command - returns MAC address.')
  },
-'AVMT': {'version': ['1', ],
+'AVMT': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Blank/unblank video and/or mute audio.')
  },
-'CLSS': {'version': ['1', ],
+'CLSS': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query projector PJLink class support.')
  },
 'ERST': {'version': ['1', '2'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query error status from projector. '
   'Returns fan/lamp/temp/cover/filter/other error status.')
  },
-'FILT': {'version': ['2', ],
+'FILT': {'version': ['2'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query number of hours on filter.')
  },
-'FREZ': {'version': ['2', ],
+'FREZ': {'version': ['2'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Freeze or unfreeze current image being projected.')
  },
-'INF1': {'version': ['1', ],
+'INF1': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query projector manufacturer name.')
  },
-'INF2': {'version': ['1', ],
+'INF2': {'version': ['1'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query projector product name.')
  },
-'INFO': {'version': ['1', ],
+'INFO': {'version': ['1'],
+ 'default': '1',
  'description': 

[Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-03-24 Thread Ken Roberts
The proposal to merge lp:~alisonken1/openlp/pjlink2-q into lp:openlp has been 
updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/341563
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-03-18 Thread Ken Roberts
which fix is clashing? I tried a merge from trunk and it merged fine.
-- 
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/341563
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-03-18 Thread Ken Roberts
> Sorry will clash with one of my fixes which has been merged
> 
> See question

>>  'ACKN': {'version': ['2', ],
>> + 'default': '2',

>Why do we have a missing slot?

2 new commands in PJLink are only valid for version 2 and have no version 1 
equivalent.
Missing slot is to maintain compatibility with version checker.

>> -def process_clss(self, data):
>> +def process_clss(self, data, *args, **kwargs):

>why args
Some commands take host,port arguments but not all of them do.
Since there is a common entry point, need to keep availability of consuming 
extra args/kwargs without causing exception due to extra parameters.
(Yes, there should be no args passed only keyword args, but better safe than 
sorry)

-- 
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/341563
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-03-18 Thread Tim Bentley
Review: Needs Fixing

Sorry will clash with one of my fixes which has been merged

See question

Diff comments:

> 
> === modified file 'openlp/core/projectors/constants.py'
> --- openlp/core/projectors/constants.py   2018-01-03 00:35:14 +
> +++ openlp/core/projectors/constants.py   2018-03-17 17:48:23 +
> @@ -154,110 +154,137 @@
>  S_INFO
>  ]
>  
> -# NOTE: Changed format to account for some commands are both class 1 and 2
> +# NOTE: Changed format to account for some commands are both class 1 and 2.
> +#   Make sure the sequence of 'version' is lowest-to-highest.
>  PJLINK_VALID_CMD = {
>  'ACKN': {'version': ['2', ],
> + 'default': '2',

Why do we have a missing slot?

>   'description': translate('OpenLP.PJLinkConstants',
>'Acknowledge a PJLink SRCH command - 
> returns MAC address.')
>   },
>  'AVMT': {'version': ['1', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Blank/unblank video and/or mute 
> audio.')
>   },
>  'CLSS': {'version': ['1', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query projector PJLink class 
> support.')
>   },
>  'ERST': {'version': ['1', '2'],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query error status from projector. '
>'Returns 
> fan/lamp/temp/cover/filter/other error status.')
>   },
>  'FILT': {'version': ['2', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query number of hours on filter.')
>   },
>  'FREZ': {'version': ['2', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Freeze or unfreeze current image 
> being projected.')
>   },
>  'INF1': {'version': ['1', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query projector manufacturer name.')
>   },
>  'INF2': {'version': ['1', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query projector product name.')
>   },
>  'INFO': {'version': ['1', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query projector for other information 
> set by manufacturer.')
>   },
>  'INNM': {'version': ['2', ],
> + 'default': '2',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query specified input source name')
>   },
>  'INPT': {'version': ['1', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Switch to specified video source.')
>   },
>  'INST': {'version': ['1', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query available input sources.')
>   },
>  'IRES': {'version:': ['2', ],
> + 'default': '2',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query current input resolution.')
>   },
>  'LAMP': {'version': ['1', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query lamp time and on/off status. 
> Multiple lamps supported.')
>   },
>  'LKUP': {'version': ['2', ],
> + 'default': '2',
>   'description': translate('OpenLP.PJLinkConstants',
>'UDP Status - Projector is now 
> available on network. Includes MAC address.')
>   },
>  'MVOL': {'version': ['2', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Adjust microphone volume by 1 step.')
>   },
>  'NAME': {'version': ['1', ],
> + 'default': '1',
>   'description': translate('OpenLP.PJLinkConstants',
>'Query customer-set projector name.')
>   },
>  'PJLINK': {'version': ['1', ],
> +   'default': '1',
> 'description': 

[Openlp-core] [Merge] lp:~alisonken1/openlp/pjlink2-q into lp:openlp

2018-03-17 Thread Ken Roberts
Ken Roberts has proposed merging lp:~alisonken1/openlp/pjlink2-q into lp:openlp.

Commit message:
PJLink2 update Q

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~alisonken1/openlp/pjlink2-q/+merge/341563

PJLink2 update Q


lp:~alisonken1/openlp/pjlink2-q (revision 2814)
https://ci.openlp.io/job/Branch-01-Pull/2479/  [SUCCESS]
https://ci.openlp.io/job/Branch-02a-Linux-Tests/2380/  [SUCCESS]
https://ci.openlp.io/job/Branch-02b-macOS-Tests/167/   [FAILURE]
https://ci.openlp.io/job/Branch-03a-Build-Source/89/   [SUCCESS]
https://ci.openlp.io/job/Branch-03b-Build-macOS/82/[SUCCESS]
https://ci.openlp.io/job/Branch-04a-Code-Analysis/1551/[SUCCESS]
https://ci.openlp.io/job/Branch-04b-Test-Coverage/1364/[SUCCESS]
https://ci.openlp.io/job/Branch-05-AppVeyor-Tests/296/ [FAILURE]


- Fix test_projector_db:TestProjectorDBUpdate segfault by
creating self.main_window steps
- Pep8 on openlp/core/common/__init__.get_local_ip4()
- Collapse import from projector.constants from line-per-item to 
multi-items-per-line
- Change pjlink_functions to include class version for projector instance in 
command
- Set projector.editform to only allow editing IP address field for new entry 
only (used as db key entry)
- Collapse projector.manager imports from entry-per-line to compact import
- projector.pjlink:
- Merge pjlink_functions_udp into pjlink_functions
- Change pjlink_functions to add instance-specific version to commands
- Fix command checks to changed pjlink_funcions
- Update process_clss to update PJLink version in pjlink_functions
- Update reset_information to update PJLink version in pjlink_functions
- renamed test_projectorsourceform.py to test_projector_sourceform.py
- renamed test_projectoreditform.py to test_projector_editform.py
- Fix projector tests

-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~alisonken1/openlp/pjlink2-q into lp:openlp.
=== modified file 'openlp/core/common/__init__.py'
--- openlp/core/common/__init__.py	2018-02-11 21:52:04 +
+++ openlp/core/common/__init__.py	2018-03-17 17:48:23 +
@@ -76,7 +76,7 @@
 'netmask': address.netmask().toString(),
 'prefix': address.prefixLength(),
 'localnet': QHostAddress(address.netmask().toIPv4Address() &
-ip.toIPv4Address()).toString()
+ ip.toIPv4Address()).toString()
 }
 log.debug('Adding {iface} to active list'.format(iface=iface.name()))
 if len(MY_IP4) == 1:

=== modified file 'openlp/core/projectors/constants.py'
--- openlp/core/projectors/constants.py	2018-01-03 00:35:14 +
+++ openlp/core/projectors/constants.py	2018-03-17 17:48:23 +
@@ -154,110 +154,137 @@
 S_INFO
 ]
 
-# NOTE: Changed format to account for some commands are both class 1 and 2
+# NOTE: Changed format to account for some commands are both class 1 and 2.
+#   Make sure the sequence of 'version' is lowest-to-highest.
 PJLINK_VALID_CMD = {
 'ACKN': {'version': ['2', ],
+ 'default': '2',
  'description': translate('OpenLP.PJLinkConstants',
   'Acknowledge a PJLink SRCH command - returns MAC address.')
  },
 'AVMT': {'version': ['1', ],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Blank/unblank video and/or mute audio.')
  },
 'CLSS': {'version': ['1', ],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query projector PJLink class support.')
  },
 'ERST': {'version': ['1', '2'],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query error status from projector. '
   'Returns fan/lamp/temp/cover/filter/other error status.')
  },
 'FILT': {'version': ['2', ],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Query number of hours on filter.')
  },
 'FREZ': {'version': ['2', ],
+ 'default': '1',
  'description': translate('OpenLP.PJLinkConstants',
   'Freeze or unfreeze current image being projected.')
  },
 'INF1': {'version': ['1', ],
+ 'default':